Class: Runt::Event
- Inherits:
-
Object
- Object
- Runt::Event
- Defined in:
- lib/runt/schedule.rb
Overview
TODO: Extend event to take other attributes
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id) ⇒ Event
constructor
A new instance of Event.
- #to_s ⇒ Object
Constructor Details
#initialize(id) ⇒ Event
Returns a new instance of Event.
93 94 95 96 |
# File 'lib/runt/schedule.rb', line 93 def initialize(id) raise Exception, "id argument cannot be nil" unless !id.nil? @id=id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
91 92 93 |
# File 'lib/runt/schedule.rb', line 91 def id @id end |
Instance Method Details
#==(other) ⇒ Object
100 101 102 |
# File 'lib/runt/schedule.rb', line 100 def == (other) return true if other.kind_of?(Event) && @id==other.id end |
#to_s ⇒ Object
98 |
# File 'lib/runt/schedule.rb', line 98 def to_s; @id.to_s end |