Class: Wee::MessageBox
- Defined in:
- lib/wee/components/messagebox.rb
Instance Method Summary collapse
-
#initialize(text) ⇒ MessageBox
constructor
A new instance of MessageBox.
- #render ⇒ Object
Methods inherited from Component
#add_decoration, #backtrack_state, #backtrack_state_chain, #decoration, #decoration=, #do_render_chain, #each_decoration, #process_callbacks, #process_callbacks_chain, #remove_decoration, #remove_decoration_if
Methods inherited from Presenter
#backtrack_state, #do_render, #get_property, #lookup_property, #process_callbacks, #properties, #properties=, #session, template, uses_property
Constructor Details
#initialize(text) ⇒ MessageBox
Returns a new instance of MessageBox.
2 3 4 5 |
# File 'lib/wee/components/messagebox.rb', line 2 def initialize(text) super() @text = text end |
Instance Method Details
#render ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/wee/components/messagebox.rb', line 7 def render r.bold(@text) r.form do r..value('OK').callback(:answer, true) r.space r..value('Cancel').callback(:answer, false) end end |