Class: Worque::Command::Todo::Options
- Inherits:
-
Object
- Object
- Worque::Command::Todo::Options
- Defined in:
- lib/worque/command/todo/options.rb
Instance Attribute Summary collapse
-
#append_task ⇒ Object
Returns the value of attribute append_task.
-
#for ⇒ Object
Returns the value of attribute for.
-
#path ⇒ Object
Returns the value of attribute path.
-
#skip_weekend ⇒ Object
writeonly
Sets the attribute skip_weekend.
-
#template_path ⇒ Object
readonly
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Options
constructor
A new instance of Options.
- #skip_weekend? ⇒ Boolean
Constructor Details
#initialize(opts) ⇒ Options
Returns a new instance of Options.
13 14 15 16 17 18 19 |
# File 'lib/worque/command/todo/options.rb', line 13 def initialize(opts) @path = opts[:path] @skip_weekend = opts[:skip_weekend] @for = opts[:for] @append_task = opts[:append_task] @template_path = opts.fetch(:template_path, nil) end |
Instance Attribute Details
#append_task ⇒ Object
Returns the value of attribute append_task.
9 10 11 |
# File 'lib/worque/command/todo/options.rb', line 9 def append_task @append_task end |
#for ⇒ Object
Returns the value of attribute for.
8 9 10 |
# File 'lib/worque/command/todo/options.rb', line 8 def for @for end |
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/worque/command/todo/options.rb', line 7 def path @path end |
#skip_weekend=(value) ⇒ Object (writeonly)
Sets the attribute skip_weekend
10 11 12 |
# File 'lib/worque/command/todo/options.rb', line 10 def skip_weekend=(value) @skip_weekend = value end |
#template_path ⇒ Object (readonly)
Returns the value of attribute template_path.
11 12 13 |
# File 'lib/worque/command/todo/options.rb', line 11 def template_path @template_path end |
Instance Method Details
#skip_weekend? ⇒ Boolean
21 22 23 |
# File 'lib/worque/command/todo/options.rb', line 21 def skip_weekend? !!@skip_weekend end |