Class: GAQ::EventCollectionRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/google_analytics_tools/tracking/events/event_collection_renderer.rb

Instance Method Summary collapse

Constructor Details

#initialize(event_collection, tracker_id) ⇒ EventCollectionRenderer

Returns a new instance of EventCollectionRenderer.


5
6
7
8
# File 'lib/google_analytics_tools/tracking/events/event_collection_renderer.rb', line 5

def initialize(event_collection, tracker_id)
  @event_collection = event_collection
  @tracker_id = tracker_id
end

Instance Method Details

#to_sObject


10
11
12
# File 'lib/google_analytics_tools/tracking/events/event_collection_renderer.rb', line 10

def to_s
  @event_collection.map { |event| EventRenderer.new(event, @tracker_id).to_s }.join("\n")
end