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
2 3 4 |
# File 'lib/ga_events/event.rb', line 2 def action @action end |
#category ⇒ Object
Returns the value of attribute category
2 3 4 |
# File 'lib/ga_events/event.rb', line 2 def category @category end |
#label ⇒ Object
Returns the value of attribute label
2 3 4 |
# File 'lib/ga_events/event.rb', line 2 def label @label end |
#value ⇒ Object
Returns the value of attribute value
2 3 4 |
# File 'lib/ga_events/event.rb', line 2 def value @value end |
Class Method Details
.from_string(str) ⇒ Object
13 14 15 |
# File 'lib/ga_events/event.rb', line 13 def self.from_string(str) new(*str.split('|')) end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/ga_events/event.rb', line 9 def to_s [category, action, label, value].join('|') end |