Class: TimeScheduler::EventItem
- Inherits:
-
Object
- Object
- TimeScheduler::EventItem
- Includes:
- Comparable
- Defined in:
- lib/time_scheduler/event.rb
Instance Attribute Summary collapse
-
#ident ⇒ Object
readonly
Returns the value of attribute ident.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(time, queue, ident) ⇒ EventItem
constructor
A new instance of EventItem.
Constructor Details
#initialize(time, queue, ident) ⇒ EventItem
Returns a new instance of EventItem.
11 12 13 14 15 |
# File 'lib/time_scheduler/event.rb', line 11 def initialize( time, queue, ident ) @time = time @queue = queue @ident = ident end |
Instance Attribute Details
#ident ⇒ Object (readonly)
Returns the value of attribute ident.
9 10 11 |
# File 'lib/time_scheduler/event.rb', line 9 def ident @ident end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
9 10 11 |
# File 'lib/time_scheduler/event.rb', line 9 def queue @queue end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
9 10 11 |
# File 'lib/time_scheduler/event.rb', line 9 def time @time end |
Instance Method Details
#<=>(other) ⇒ Object
17 18 19 20 |
# File 'lib/time_scheduler/event.rb', line 17 def <=>( other ) return nil unless other.is_a?( EventItem ) self.time <=> other.time end |