Class: ConsoleRtm::Action
- Inherits:
-
Object
- Object
- ConsoleRtm::Action
- Defined in:
- lib/rmilk/console_ui.rb
Instance Method Summary collapse
- #apply! ⇒ Object
- #apply? ⇒ Boolean
-
#initialize(task_repo, list_repo, is_apply, &apply) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(task_repo, list_repo, is_apply, &apply) ⇒ Action
Returns a new instance of Action.
28 29 30 31 32 33 |
# File 'lib/rmilk/console_ui.rb', line 28 def initialize(task_repo, list_repo, is_apply, &apply) @task_repo = task_repo @list_repo = list_repo @is_apply = is_apply @apply = apply end |
Instance Method Details
#apply! ⇒ Object
39 40 41 |
# File 'lib/rmilk/console_ui.rb', line 39 def apply! @apply.call end |
#apply? ⇒ Boolean
35 36 37 |
# File 'lib/rmilk/console_ui.rb', line 35 def apply? @is_apply.call end |