Module: Flumtter::Command::User
- Includes:
- Util
- Defined in:
- lib/flumtter/app/core/command/user.rb
Instance Method Summary collapse
Methods included from Util
#command_value_regexp, #dialog_for_index, #error, #error_handler, #id2obj, #if_tweet, #index_regexp, #index_with_dialog, #logger, #on_event, #parse_index, #parse_time, #sarastire, #sarastire_user, #screen_name_regexp
Instance Method Details
#add_command(user, twitter) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/flumtter/app/core/command/user.rb', line 5 def add_command(user, twitter) command("tweet", "Tweet List") do error_handler do Window::Tweet.new(user, twitter).show end end command("follower", "Follower List") do error_handler do Window::Follower.new(user, twitter).show end end command("following", "Following List") do error_handler do Window::Following.new(user, twitter).show end end command("favorite", "Favorite List") do error_handler do Window::Favorite.new(user, twitter).show end end command("follow", "Follow") do error_handler do twitter.rest.follow(user.screen_name) Window::Popup::Success.new("follow success").show end end command("unfollow", "Unfollow") do error_handler do twitter.rest.unfollow(user.screen_name) Window::Popup::Success.new("unfollow success").show end end command("block", "Block") do error_handler do twitter.rest.block(user.screen_name) Window::Popup::Success.new("block success").show end end command("unblock", "UnBlock") do error_handler do twitter.rest.unblock(user.screen_name) Window::Popup::Success.new("unblock success").show end end end |