Class: Timeline::Event
- Inherits:
-
Object
- Object
- Timeline::Event
- Defined in:
- app/values/timeline/event.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#happened_at ⇒ Object
Returns the value of attribute happened_at.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(attributes) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(attributes) ⇒ Event
Returns a new instance of Event.
5 6 7 8 9 |
# File 'app/values/timeline/event.rb', line 5 def initialize(attributes) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'app/values/timeline/event.rb', line 3 def description @description end |
#happened_at ⇒ Object
Returns the value of attribute happened_at.
3 4 5 |
# File 'app/values/timeline/event.rb', line 3 def happened_at @happened_at end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'app/values/timeline/event.rb', line 3 def title @title end |
Instance Method Details
#<=>(other) ⇒ Object
19 20 21 |
# File 'app/values/timeline/event.rb', line 19 def <=>(other) happened_at <=> other.happened_at end |