Ruby5 #449
Ruby5 - Episode #449– March 18th, 2014
- Experimental Features
- business hours feature flag
- Rails is Half Your App
- Rake Rule Tasks
rule /foo/ do |task|
puts 'called task named: %s' % task.name
- Polymorphism
- Inheritance
- Duck Typing
- Decorator Pattern
- A Simple Before and After
- Hash Selector Pattern
- 8min video
if flash[:type] == :success ; 'alert-success' ; elsif flash[:type] == :error
case flash[:type] ; when :success then 'alert-success'
- case is really slow
{ success: 'alert-success', ..., warn: 'alert-warning' }[flash[:type]]
- Procs and Lambdas
{ true => -> { self.respond_with @post, @comment },
false => -> { self.xms_error @comment }
}[@comment.save].call
- Rails 4.0.4 released
- bug fix release and includes more than 290 commits
Hash Selector Patternはどこからも教わらず自分で編み出してよく使ってた
♫ Bee Gees - Night Fever
by SoundHound