Class: Pomodoro::Schedule::Thing
- Inherits:
-
Object
- Object
- Pomodoro::Schedule::Thing
- Defined in:
- lib/pomodoro/schedule/dsl.rb
Instance Method Summary collapse
- #call(tasks) ⇒ Object
-
#initialize(condition, &block) ⇒ Thing
constructor
A new instance of Thing.
- #true? ⇒ Boolean
Constructor Details
#initialize(condition, &block) ⇒ Thing
Returns a new instance of Thing.
7 8 9 |
# File 'lib/pomodoro/schedule/dsl.rb', line 7 def initialize(condition, &block) @condition, @callable = condition, block end |
Instance Method Details
#call(tasks) ⇒ Object
15 16 17 |
# File 'lib/pomodoro/schedule/dsl.rb', line 15 def call(tasks) @callable.call(tasks) end |
#true? ⇒ Boolean
11 12 13 |
# File 'lib/pomodoro/schedule/dsl.rb', line 11 def true? @condition.call end |