Class: Flumtter::Window::ListSelector

Inherits:
Buf::Screen show all
Defined in:
lib/flumtter/app/core/windows/list.rb

Constant Summary

Constants inherited from Buf::Screen

Buf::Screen::EnableKey

Instance Method Summary collapse

Methods inherited from Buf::Screen

#call, #id2obj, #move, #show

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

Methods inherited from Dialog

#call, #command, #show

Methods included from Dispel::Util

#add_multiline_str, #addstr, #getstr

Constructor Details

#initialize(type, twitter, user = twitter.account.screen_name) ⇒ ListSelector

Returns a new instance of ListSelector.



56
57
58
59
60
61
62
63
64
# File 'lib/flumtter/app/core/windows/list.rb', line 56

def initialize(type, twitter, user=twitter..screen_name)
  super(ListSelectorBuf.new(type, twitter, user), "#{user} #{type}")
  command(/^(\d+)$/, "list") do |m|
    error_handler do
      obj, _ = parse_index(m[1])
      List.new(obj, twitter).show
    end
  end
end