Class: TaskwarriorWeb::Command

Inherits:
Object
  • Object
show all
Includes:
CommandBuilder, Runner
Defined in:
lib/taskwarrior-web/model/command.rb

Constant Summary

Constants included from Runner

Runner::TASK_BIN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Runner

#run

Methods included from CommandBuilder

included

Constructor Details

#initialize(command, id = nil, *args) ⇒ Command

Returns a new instance of Command.



7
8
9
10
11
# File 'lib/taskwarrior-web/model/command.rb', line 7

def initialize(command, id = nil, *args)
  @command = command if command
  @id = id if id
  @params = args.last.is_a?(::Hash) ? args.pop : {}
end

Instance Attribute Details

#builtObject

Returns the value of attribute built.



5
6
7
# File 'lib/taskwarrior-web/model/command.rb', line 5

def built
  @built
end

#commandObject

Returns the value of attribute command.



5
6
7
# File 'lib/taskwarrior-web/model/command.rb', line 5

def command
  @command
end

#command_stringObject

Returns the value of attribute command_string.



5
6
7
# File 'lib/taskwarrior-web/model/command.rb', line 5

def command_string
  @command_string
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/taskwarrior-web/model/command.rb', line 5

def id
  @id
end

#paramsObject

Returns the value of attribute params.



5
6
7
# File 'lib/taskwarrior-web/model/command.rb', line 5

def params
  @params
end