Class: Runt::ScheduleElement
- Inherits:
-
Object
- Object
- Runt::ScheduleElement
- Defined in:
- lib/runt/schedule.rb
Instance Method Summary collapse
- #include?(event, date) ⇒ Boolean
-
#initialize(event, expression) ⇒ ScheduleElement
constructor
A new instance of ScheduleElement.
- #to_s ⇒ Object
Constructor Details
#initialize(event, expression) ⇒ ScheduleElement
Returns a new instance of ScheduleElement.
53 54 55 56 |
# File 'lib/runt/schedule.rb', line 53 def initialize(event, expression) @event = event @expression = expression end |
Instance Method Details
#include?(event, date) ⇒ Boolean
58 59 60 61 |
# File 'lib/runt/schedule.rb', line 58 def include?(event, date) return false unless @event == event @expression.include?(date) end |
#to_s ⇒ Object
63 64 65 |
# File 'lib/runt/schedule.rb', line 63 def to_s "event: #{@event} expr: #{@expression}" end |