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.



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_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

#template_pathObject (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

Returns:

  • (Boolean)


21
22
23
# File 'lib/worque/command/todo/options.rb', line 21

def skip_weekend?
  !!@skip_weekend
end