module Shout::Listener

Public Class Methods

included(mod) click to toggle source

Internal Methods

# File lib/shout/listener.rb, line 11
def self.included(mod)
  mod.extend(ClassMethods)
  mod.callbacks = []
end
new(observed) click to toggle source

Implementor Methods

# File lib/shout/listener.rb, line 6
def initialize(observed)
  raise ArgumentError.new("Must be overriden in implementors.")
end

Public Instance Methods

update_with_shout_event(name, *params) click to toggle source
# 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