Module: Wonkavision::Plugins::BusinessActivity
- Defined in:
- lib/wonkavision/plugins/business_activity.rb,
lib/wonkavision/plugins/business_activity/event_binding.rb
Defined Under Namespace
Modules: ClassMethods, Fields
Classes: EventBinding
Class Method Summary
collapse
Class Method Details
.all ⇒ Object
5
6
7
|
# File 'lib/wonkavision/plugins/business_activity.rb', line 5
def self.all
@@all ||= []
end
|
10
11
12
13
14
15
16
17
18
|
# File 'lib/wonkavision/plugins/business_activity.rb', line 10
def self.configure(activity,options={})
activity.write_inheritable_attribute :business_activity_options, {}
activity.class_inheritable_reader :business_activity_options
activity.write_inheritable_attribute :correlation_ids, []
activity.class_inheritable_reader :correlation_ids
BusinessActivity.all << activity
end
|
.normalize_correlation_ids(*args) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/wonkavision/plugins/business_activity.rb', line 20
def self.normalize_correlation_ids(*args)
model_field,event_field = if args.length == 1 then
case args[0]
when Hash then [args[0][:model], args[0][:event] || args[0][:model]]
else [args[0],args[0]]
end
else
[args[0],args[1] || args[0]]
end
{:model=>model_field,:event=>event_field}
end
|