Class: RTMCommands
- Inherits:
-
Object
- Object
- RTMCommands
- Defined in:
- lib/commands.rb
Instance Method Summary collapse
- #help(*command) ⇒ Object
-
#initialize(rtm_instance) ⇒ RTMCommands
constructor
A new instance of RTMCommands.
- #lists ⇒ Object
Constructor Details
#initialize(rtm_instance) ⇒ RTMCommands
Returns a new instance of RTMCommands.
8 9 10 11 |
# File 'lib/commands.rb', line 8 def initialize(rtm_instance) @help = RTMHelp.new @rtm = rtm_instance end |
Instance Method Details
#help(*command) ⇒ Object
13 14 15 |
# File 'lib/commands.rb', line 13 def help(*command) @help.get_help(*command) end |
#lists ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/commands.rb', line 17 def lists out = '' c = 0 @rtm.lists.getList.each { |l| out += ' ['+c.to_s+'] ' + l.to_a[1][:name] + "\n" c+=1 } out end |