Class: Toodledo::CommandLine::ListTasksByContextCommand
- Inherits:
-
BaseCommand
- Object
- CmdParse::Command
- BaseCommand
- Toodledo::CommandLine::ListTasksByContextCommand
- Defined in:
- lib/toodledo/command_line/list_tasks_by_context_command.rb
Overview
List Tasks By Context
Instance Method Summary collapse
- #execute(args) ⇒ Object
-
#initialize(client) ⇒ ListTasksByContextCommand
constructor
A new instance of ListTasksByContextCommand.
Methods inherited from BaseCommand
Constructor Details
#initialize(client) ⇒ ListTasksByContextCommand
Returns a new instance of ListTasksByContextCommand.
8 9 10 11 12 |
# File 'lib/toodledo/command_line/list_tasks_by_context_command.rb', line 8 def initialize(client) super(client, 'nested', false) self.short_desc = "List tasks by context" self.description = "Lists the tasks grouped by context." end |
Instance Method Details
#execute(args) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/toodledo/command_line/list_tasks_by_context_command.rb', line 14 def execute(args) Toodledo.begin(client.logger) do |session| line = args.join(' ') return client.list_tasks_by_context(session, line) end return 0 end |