Module: Activist::Action::ClassMethods

Defined in:
lib/activist/action.rb

Instance Method Summary collapse

Instance Method Details

#activities(stream, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/activist/action.rb', line 7

def activities(stream, options = {})
  options.symbolize_keys!
  callback = options[:on] || ''
  
  define_method "activist_#{stream}_#{callback}" do
    store_activities(stream, options)
  end
  
  send(callback, "activist_#{stream}_#{callback}")
end