Module: Protocolist

Defined in:
lib/protocolist.rb,
lib/protocolist/railtie.rb,
lib/protocolist/version.rb,
lib/protocolist/util/data_proc.rb,
lib/protocolist/model_additions.rb,
lib/protocolist/controller_additions.rb,
lib/protocolist/controller_additions/initializer.rb,
lib/generators/protocolist/install/install_generator.rb

Defined Under Namespace

Modules: ControllerAdditions, Generators, ModelAdditions, Util Classes: Railtie

Constant Summary collapse

VERSION =
"1.0.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.activity_classObject

Returns the value of attribute activity_class.



18
19
20
# File 'lib/protocolist.rb', line 18

def activity_class
  @activity_class
end

.actorObject

Returns the value of attribute actor.



18
19
20
# File 'lib/protocolist.rb', line 18

def actor
  @actor
end

Class Method Details

.fire(activity_type, options = {}) ⇒ Object



12
13
14
15
# File 'lib/protocolist.rb', line 12

def self.fire(activity_type, options = {})
  options = options.reverse_merge(actor:@actor, activity_type: activity_type)
  @activity_class.try(:create, options) if options[:actor]
end