Class: Flumtter::Window::ListSelectorBuf

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

Instance Attribute Summary

Attributes inherited from Buf::Buf

#cursor

Instance Method Summary collapse

Methods inherited from Buf::Buf

#[], #add, #adds, #get, #prev, #size

Constructor Details

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

Returns a new instance of ListSelectorBuf.



43
44
45
46
# File 'lib/flumtter/app/core/windows/list.rb', line 43

def initialize(type, twitter, user=twitter..screen_name)
  @user, @type, @twitter = user, type, twitter
  super(ListBase)
end

Instance Method Details

#prefetchObject



48
49
50
51
52
# File 'lib/flumtter/app/core/windows/list.rb', line 48

def prefetch
  if @buf.empty?
    adds(@twitter.rest.send(@type, @user))
  end
end