Class: Toodledo::CommandLine::ListTomorrowCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/toodledo/command_line/list_tomorrow_command.rb

Overview

Lists the tasks.

Instance Method Summary collapse

Methods inherited from BaseCommand

#client

Constructor Details

#initialize(client) ⇒ ListTomorrowCommand

Returns a new instance of ListTomorrowCommand.



9
10
11
12
13
# File 'lib/toodledo/command_line/list_tomorrow_command.rb', line 9

def initialize(client)
  super(client, 'tomorrow', false)
  self.short_desc = "Tomorrow's tasks"
  self.description = "Lists tasks for tomorrow in Toodledo."
end

Instance Method Details

#execute(args) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/toodledo/command_line/list_tomorrow_command.rb', line 15

def execute(args)
	line = args.join(' ')        
 
  Toodledo.begin(client.logger) do |session|            
    return client.list_tomorrow_tasks(session, line)
  end
  
  return 0
end