Class: Toodledo::CommandLine::ListGoalsCommand

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

Overview

List Goals

Instance Method Summary collapse

Methods inherited from BaseCommand

#client

Constructor Details

#initialize(client) ⇒ ListGoalsCommand

Returns a new instance of ListGoalsCommand.



13
14
15
16
17
# File 'lib/toodledo/command_line/list_goals_command.rb', line 13

def initialize(client)
  super(client, 'goals', false)
  self.short_desc = "List goals"
  self.description = "Lists the goals in Toodledo."
end

Instance Method Details

#execute(args) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/toodledo/command_line/list_goals_command.rb', line 19

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