Module: Slapp::Sugar
Instance Method Summary collapse
Instance Method Details
#button(name, options = {}) ⇒ Object
36 37 38 |
# File 'lib/slapp.rb', line 36 def name, = {} elements[name] ||= Button.new elements[:frame], -1, [:caption] end |
#elements ⇒ Object
32 33 34 |
# File 'lib/slapp.rb', line 32 def elements @elements ||= {} end |
#frame(options = {}, &block) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/slapp.rb', line 25 def frame = {}, &block elements[:frame] = Frame.new(nil, -1, [:title]) block.call elements[:frame].show return elements[:frame] end |