Class: VER::View::List::Window

Inherits:
VER::View::List show all
Defined in:
lib/ver/view/list/buffer.rb

Instance Attribute Summary

Attributes inherited from VER::View::List

#callback, #entry, #frame, #list, #parent, #tag

Instance Method Summary collapse

Methods inherited from VER::View::List

#cancel, #completion, #destroy, #initialize, #line_down, #line_up, #message, #on_update, #pick, #pick_first, #pick_selection, #quit, #select_index, #setup_events, #setup_keymap, #setup_widgets, #sublist

Constructor Details

This class inherits a constructor from VER::View::List

Instance Method Details

#pick_action(filename) ⇒ Object



12
13
14
15
# File 'lib/ver/view/list/buffer.rb', line 12

def pick_action(filename)
  view = windows[filename]
  callback.call(view) if callback && view
end

#updateObject



3
4
5
# File 'lib/ver/view/list/buffer.rb', line 3

def update
  list.value = sublist(windows.keys)
end

#windowsObject



7
8
9
10
# File 'lib/ver/view/list/buffer.rb', line 7

def windows
  path_view = parent.layout.views.map{|view| [view.filename.to_s, view] }
  Hash[path_view]
end