Class: Magellanalytics::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/magellanalytics/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/magellanalytics/event.rb', line 5

def description
  @description
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/magellanalytics/event.rb', line 5

def name
  @name
end