Sha256: af67fcf5ef9a6bddc3c9e3c9308a39f300c4cd89f353994ae24b368b995ced6c

Contents?: true

Size: 550 Bytes

Versions: 4

Compression:

Stored size: 550 Bytes

Contents

module VER
  class View::List::Window < View::List
    def update
      list.value = sublist(windows.keys)
    end

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

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

  class View::List::Buffer < View::List
    def update
      list.value = sublist(buffers)
    end

    def buffers
      VER.paths.map(&:to_s).select {|b| ! b.empty? }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ver-2009.12.14 lib/ver/view/list/buffer.rb
ver-2009.11.29 lib/ver/view/list/buffer.rb
ver-2009.11.28 lib/ver/view/list/buffer.rb
ver-2009.10.14 lib/ver/view/list/buffer.rb