Class: Ruboty::Todo::Actions::List

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/todo/actions/list.rb

Instance Attribute Summary

Attributes inherited from Base

#todo_list

Instance Method Summary collapse

Instance Method Details

#callObject



5
6
7
8
# File 'lib/ruboty/todo/actions/list.rb', line 5

def call
  super
  message.reply(send(message[:command].to_sym))
end

#cleanupObject



14
15
16
17
# File 'lib/ruboty/todo/actions/list.rb', line 14

def cleanup
  todo_list.cleanup
  list
end

#listObject



10
11
12
# File 'lib/ruboty/todo/actions/list.rb', line 10

def list
  todo_list.items.map(&:format).join(?\n)
end

#renumObject



19
20
21
22
# File 'lib/ruboty/todo/actions/list.rb', line 19

def renum
  todo_list.renum
  list
end