Method: RubyText::Window::Menu2D::Vertical#initialize

Defined in:
lib/menu.rb

#initialize(vlist) ⇒ Vertical

Returns a new instance of Vertical.



15
16
17
18
19
20
21
# File 'lib/menu.rb', line 15

def initialize(vlist)
  @header = vlist[0]
  @hash = vlist[1]
  @widest = @header.length
  @hash.each_pair {|k,v| puts "k = #{k.inspect}"; getch; @widest = [@widest, k.length].max }
  @height = @hash.size
end