Class: AffirmIt::Event
- Inherits:
-
Object
- Object
- AffirmIt::Event
- Defined in:
- lib/affirmit/event/event.rb
Direct Known Subclasses
Constant Summary collapse
- EVENT_TYPE_DESCRIPTIONS =
{ :embrace_started => "Embrace started", :embrace_ended => "Embrace ended", :arms_wrapped_around => "Arms wrapped around an affirmation", :arms_disentangled_from => "Arms disentangled from an affirmation", :affirmation_cherished => "Affirmation cherished", :affirmation_added => "Affirmation added", :preference_added => "Preference added", :bonus_point_added => "Bonus point added", :praise => "Praise", :success_deferred => "Success deferred", :differing_opinion_encountered => "Differing opinion encountered", :behavioral_challenge_admitted => "Behavioral challenge admitted", :issue_raised => "Issue raised", :pig_expelled => "Intolerant pig expelled" }
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(type) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(type) ⇒ Event
Returns a new instance of Event.
22 23 24 |
# File 'lib/affirmit/event/event.rb', line 22 def initialize type @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
20 21 22 |
# File 'lib/affirmit/event/event.rb', line 20 def type @type end |
Instance Method Details
#description ⇒ Object
26 27 28 |
# File 'lib/affirmit/event/event.rb', line 26 def description EVENT_TYPE_DESCRIPTIONS[@type] end |