Class: GaEvents::Event
- Inherits:
-
Struct
- Object
- Struct
- GaEvents::Event
- Defined in:
- lib/ga_events/event.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#category ⇒ Object
Returns the value of attribute category.
-
#label ⇒ Object
Returns the value of attribute label.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(category = '-', action = '-', label = '-', value = 1) ⇒ Event
constructor
Default values are set here, see README.md for details.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
4 5 6 |
# File 'lib/ga_events/event.rb', line 4 def action @action end |
#category ⇒ Object
Returns the value of attribute category
4 5 6 |
# File 'lib/ga_events/event.rb', line 4 def category @category end |
#label ⇒ Object
Returns the value of attribute label
4 5 6 |
# File 'lib/ga_events/event.rb', line 4 def label @label end |
#value ⇒ Object
Returns the value of attribute value
4 5 6 |
# File 'lib/ga_events/event.rb', line 4 def value @value end |
Class Method Details
.from_string(str) ⇒ Object
15 16 17 |
# File 'lib/ga_events/event.rb', line 15 def self.from_string(str) new(*str.split('|')) end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/ga_events/event.rb', line 11 def to_s [category, action, label, value].join('|') end |