README.rdoc in event_emitter-0.0.7 vs README.rdoc in event_emitter-0.1.0
- old
+ new
@@ -43,17 +43,17 @@
user.emit :go, {:place => "mountain"}
# => "shokai go to mountain"
regist event using "once"
- user.once :eat do |data|
- puts "#{name} -> #{data}"
+ user.once :eat do |what, where|
+ puts "#{name} -> eat #{what} at #{where}"
end
call
- user.emit :eat, "BEEF" # => "shokai -> BEEF"
- user.emit :eat, "Ramen" # => do not call. call only first time.
+ user.emit :eat, "BEEF", "zanmai" # => "shokai -> eat BEEF at zanmai"
+ user.emit :eat, "Ramen", "marutomo" # => do not call. call only first time.
apply as instance-specific method
class Foo
end