Class: Timeline::Event

Inherits:
Object
  • Object
show all
Defined in:
app/values/timeline/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'app/values/timeline/event.rb', line 3

def description
  @description
end

#happened_atObject

Returns the value of attribute happened_at.



3
4
5
# File 'app/values/timeline/event.rb', line 3

def happened_at
  @happened_at
end

#titleObject

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