Class: Worque::Command::Todo::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/worque/command/todo/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Options

Returns a new instance of Options.



12
13
14
15
16
17
# File 'lib/worque/command/todo/options.rb', line 12

def initialize(opts)
  @path = opts[:path]
  @skip_weekend = opts[:skip_weekend]
  @for = opts[:for]
  @append_task = opts[:append_task]
end

Instance Attribute Details

#append_taskObject

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

#forObject

Returns the value of attribute for.



8
9
10
# File 'lib/worque/command/todo/options.rb', line 8

def for
  @for
end

#pathObject

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

Parameters:

  • value

    the value to set the attribute skip_weekend to.



10
11
12
# File 'lib/worque/command/todo/options.rb', line 10

def skip_weekend=(value)
  @skip_weekend = value
end

Instance Method Details

#skip_weekend?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/worque/command/todo/options.rb', line 19

def skip_weekend?
  !!@skip_weekend
end