Module: GaEvents::List
- Extended by:
- Forwardable
- Defined in:
- lib/ga_events/list.rb
Class Method Summary collapse
-
.init(str = nil) ⇒ Object
Init list, optionally with a string of serialized events.
- .to_s ⇒ Object
Class Method Details
.init(str = nil) ⇒ Object
Init list, optionally with a string of serialized events
17 18 19 20 |
# File 'lib/ga_events/list.rb', line 17 def init(str = nil) Thread.current[:ga_events] = [] (str || '').split('$').each { |s| GaEvents::Event.from_string(s) } end |
.to_s ⇒ Object
12 13 14 |
# File 'lib/ga_events/list.rb', line 12 def to_s data.collect(&:to_s).join('$') end |