, 100 . , a 100, b = a, b 100 a 100, a.
, :
irb> puts 100.object_id
=> 201
, ?
Ruby, . , , Ruby:
, , , ( , ), . ( , ).
Ruby , . , . , , . method_missing. , , , .
, , Person, bubba :
class Person
attr_accessor :dob, :name
def age
years = Time.now.year - @dob.year
puts "You are #{years} year#{"s" if years != 1} old"
end
def feed
puts "nom, nom, nom"
end
end
bubba = Person.new
bubba.name = "Bubba"
bubba.dob = Time.new(1983,9,26)
:

, , /? , , Ruby, - Class. , , , , . def self.method_name, , /.
, ? (aka singleton, eigen, ghost class), .
Person, , :
def bubba.drive_pickup
puts "Yee-haw!"
end
, , Person. :

, bubba, . .
, , , singleton . , , .
: x Z y Z x y? , , . , , - , .
Ruby (, ):
http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SOR.mp4
Dave Thomas Ruby Pragmatic, .
P.S. -, , , ; .