Class: AmplitudeAnalytics::DestinationPlugin

Inherits:
EventPlugin show all
Defined in:
lib/amplitude/plugin.rb

Overview

DestinationPlugin

Direct Known Subclasses

AmplitudeDestinationPlugin

Instance Attribute Summary collapse

Attributes inherited from Plugin

#plugin_type

Instance Method Summary collapse

Methods inherited from EventPlugin

#track

Constructor Details

#initializeDestinationPlugin



35
36
37
38
# File 'lib/amplitude/plugin.rb', line 35

def initialize
  super(PluginType::DESTINATION)
  @timeline = Timeline.new
end

Instance Attribute Details

#timelineObject (readonly)

Returns the value of attribute timeline.



33
34
35
# File 'lib/amplitude/plugin.rb', line 33

def timeline
  @timeline
end

Instance Method Details

#add(plugin) ⇒ Object



44
45
46
47
# File 'lib/amplitude/plugin.rb', line 44

def add(plugin)
  @timeline.add(plugin)
  self
end

#execute(event) ⇒ Object



54
55
56
57
# File 'lib/amplitude/plugin.rb', line 54

def execute(event)
  event = @timeline.process(event)
  super(event)
end

#remove(plugin) ⇒ Object



49
50
51
52
# File 'lib/amplitude/plugin.rb', line 49

def remove(plugin)
  @timeline.remove(plugin)
  self
end

#setup(client) ⇒ Object



40
41
42
# File 'lib/amplitude/plugin.rb', line 40

def setup(client)
  @timeline.setup(client)
end

#shutdownObject



59
60
61
# File 'lib/amplitude/plugin.rb', line 59

def shutdown
  @timeline.shutdown
end