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.
12 13 14 15 16 |
# File 'lib/time_scheduler/event.rb', line 12 def initialize( time, queue, ident ) @time = time @queue = queue @ident = ident end |
Instance Attribute Details
#ident ⇒ Object (readonly)
Returns the value of attribute ident.
10 11 12 |
# File 'lib/time_scheduler/event.rb', line 10 def ident @ident end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
10 11 12 |
# File 'lib/time_scheduler/event.rb', line 10 def queue @queue end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
10 11 12 |
# File 'lib/time_scheduler/event.rb', line 10 def time @time end |
Instance Method Details
#<=>(other) ⇒ Object
18 19 20 21 |
# File 'lib/time_scheduler/event.rb', line 18 def <=>( other ) return nil unless other.is_a?( EventItem ) self.time <=> other.time end |