Module: Shout::Listener
- Defined in:
- lib/shout/listener.rb
Overview
include me
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.included(mod) ⇒ Object
Internal Methods.
Instance Method Summary collapse
-
#initialize(observed) ⇒ Object
Implementor Methods.
- #update_with_shout_event(name, *params) ⇒ Object
Class Method Details
.included(mod) ⇒ Object
Internal Methods
11 12 13 14 |
# File 'lib/shout/listener.rb', line 11 def self.included(mod) mod.extend(ClassMethods) mod.callbacks = [] end |
Instance Method Details
#initialize(observed) ⇒ Object
Implementor Methods
6 7 8 |
# File 'lib/shout/listener.rb', line 6 def initialize(observed) raise ArgumentError.new("Must be overriden in implementors.") end |
#update_with_shout_event(name, *params) ⇒ Object
16 17 18 19 |
# File 'lib/shout/listener.rb', line 16 def update_with_shout_event(name, *params) a=self.class.callbacks_for_event(name) a.map{|meth| self.send(meth,*params) } end |