12. Why?
Ruby is designed for
expressiveness & happiness
Open source, from the heart:
licensing, friction,
ecosystem1
1 - http://blog.codinghorror.com/why-ruby/
13. One of the many
Perl
C Java
PHP C#
Ruby Delphi
Objective-C
C++
Python
VB
Javascript
R
SQL
F#
14. One of the many interpreted
Perl
C Java
PHP C#
Ruby Delphi
Objective-C
C++
Python
VB
Javascript
R
SQL
F#
53. Missing a method?
class Phone
def method_missing(mname, *args, &block)
puts "I don’t know about `#{mname}`"
puts caller.first
end
end
54. Missing a method?
def method_missing(mname, *args, &block)
puts "I don’t know about `#{mname}`"
puts caller.first
end
Phone.new.flips?
I don’t know about `flips?`
/my/file/path/phone.rb:42:in `<main>`
55. Who’s who?
ccllaassss Phone
def initialize(&block)
instance_eval(&block)
end
def answer!
puts "Howdy?"
end
end
56. Who’s who?
def initialize(&block)
instance_eval(&block)
end
def answer!
puts "Howdy?"
end
Phone.new { answer! }