Class: Toodledo::CommandLine::HotlistCommand

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

Instance Method Summary collapse

Methods inherited from BaseCommand

#client

Constructor Details

#initialize(client) ⇒ HotlistCommand

Returns a new instance of HotlistCommand.



4
5
6
7
8
# File 'lib/toodledo/command_line/hotlist_command.rb', line 4

def initialize(client)
  super(client, 'hotlist', false)
  self.short_desc = "Show the hotlist"
  self.description = "Shows the hotlist in Toodledo."
end

Instance Method Details

#execute(args) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/toodledo/command_line/hotlist_command.rb', line 10

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