Module: Wonkavision::Plugins::Timeline
- Defined in:
- lib/wonkavision/plugins/timeline.rb
Defined Under Namespace
Modules: ClassMethods, Fields
Class Method Summary
collapse
Class Method Details
.all ⇒ Object
4
5
6
|
# File 'lib/wonkavision/plugins/timeline.rb', line 4
def self.all
@@all ||= []
end
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/wonkavision/plugins/timeline.rb', line 8
def self.configure(activity,options={})
activity.ensure_wonkavision_plugin(Wonkavision::Plugins::BusinessActivity,options)
activity.write_inheritable_attribute :timeline_milestones, []
activity.class_inheritable_reader :timeline_milestones
options = {
:timeline_field => "timeline",
:latest_milestone_field => "latest_milestone",
:event_time_key => "event_time"
}.merge(options)
activity.business_activity_options.merge!(options)
activity.define_document_key(activity.timeline_field,Hash,:default=>{})
activity.define_document_key(activity.latest_milestone_field, String, :default=>"awaiting_first_event")
Timeline.all << activity
end
|