Class: Magellanalytics::Event
- Inherits:
-
Object
- Object
- Magellanalytics::Event
- Defined in:
- lib/magellanalytics/event.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, description = nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(name, description = nil) ⇒ Event
7 8 9 10 |
# File 'lib/magellanalytics/event.rb', line 7 def initialize(name, description = nil) @name = name.to_s.gsub(/\s+/, '_').underscore.to_sym @description = description || name.to_s.humanize end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/magellanalytics/event.rb', line 5 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/magellanalytics/event.rb', line 5 def name @name end |