Module: ActivityStream::Actor::ClassMethods

Defined in:
lib/activity_stream/actor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defined_streamsObject

Returns the value of attribute defined_streams.



54
55
56
# File 'lib/activity_stream/actor.rb', line 54

def defined_streams
  @defined_streams
end

Instance Method Details

#activity_stream(name, opts = {}) ⇒ Object

Creates an activity_stream instance method that fetches all recent activity

Parameters:

  • name (Symbol)

    the name for the sub stream you wish to access



61
62
63
64
65
# File 'lib/activity_stream/actor.rb', line 61

def activity_stream(name, opts = {})
  self.defined_streams ||= {}
  self.defined_streams[name.to_sym] = opts
  return nil
end