Displaying 1 result from an estimated 1 matches for "trashmag".
Did you mean:
trashing
2007 Jul 26
1
Lohan the observable
...pretty bored, so I apologize in
advance....
require ''observer''
# one who is observed
class Celebrity
include Observable
attr_accessor :name
attr_reader :is
def is=(val)
@is = val
changed
notify_observers(self)
end
end
# one who does the observering
class TrashMag
attr_accessor :name
def update(sender)
puts "#{name}''s Breaking News: OMG! #{sender.name} is #{sender.is}.
KeWl!!!!"
end
end
celebs = []
lohan = Celebrity.new
lohan.name = "Lindsey Lohan"
celebs << lohan
britney = Celebrity.new
britney.name = "Br...