examples/atree.rb in rbcurse-1.2.0 vs examples/atree.rb in rbcurse-1.3.0
- old
+ new
@@ -3,21 +3,21 @@
App.new do
header = app_header "rbcurse 1.2.0", :text_center => "Tree Demo", :text_right =>"New Improved!", :color => :black, :bgcolor => :white, :attr => :bold
message "Press Enter to expand/collapse"
stack :margin_top => 2, :margin => 5, :width => 30 do
- tree :height => 10, :title => "ruby way" do
+ tm = nil
+ atree = tree :height => 10, :title => "ruby way" do
root "root" do
branch "hello" do
leaf "ruby"
end
branch "goodbye" do
leaf "java"
leaf "verbosity"
end
end
end
-
# using a Hash
model = { :ruby => [ "jruby", {:mri => %W[ 1.8.6 1.8.7]}, {:yarv => %W[1.9.1 1.9.2]}, "rubinius", "macruby" ], :python => %W[ cpython jython laden-swallow ] }
tree :data => model, :title => "Hash"