Class: Toodledo::CommandLine::ListTodayCommand
- Inherits:
-
BaseCommand
- Object
- CmdParse::Command
- BaseCommand
- Toodledo::CommandLine::ListTodayCommand
- Defined in:
- lib/toodledo/command_line/list_today_command.rb
Overview
Lists the tasks.
Instance Method Summary collapse
- #execute(args) ⇒ Object
-
#initialize(client) ⇒ ListTodayCommand
constructor
A new instance of ListTodayCommand.
Methods inherited from BaseCommand
Constructor Details
#initialize(client) ⇒ ListTodayCommand
Returns a new instance of ListTodayCommand.
9 10 11 12 13 |
# File 'lib/toodledo/command_line/list_today_command.rb', line 9 def initialize(client) super(client, 'today', false) self.short_desc = "Today's tasks" self.description = "Lists tasks for today in Toodledo." end |
Instance Method Details
#execute(args) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/toodledo/command_line/list_today_command.rb', line 15 def execute(args) line = args.join(' ') Toodledo.begin(client.logger) do |session| return client.list_today_tasks(session, line) end return 0 end |