Class: Palaver::TextBox
Instance Method Summary collapse
- #filename(name) ⇒ Object
-
#initialize(options) ⇒ TextBox
constructor
A new instance of TextBox.
- #show ⇒ Object
Methods inherited from Base
#height, #text, #width, #with_tempfile
Constructor Details
#initialize(options) ⇒ TextBox
Returns a new instance of TextBox.
6 7 8 9 10 11 12 13 |
# File 'lib/palaver/textbox.rb', line 6 def initialize() super .each do |option,value| case option when :filename then filename(value) end end end |
Instance Method Details
#filename(name) ⇒ Object
20 21 22 |
# File 'lib/palaver/textbox.rb', line 20 def filename(name) @filename = name end |
#show ⇒ Object
15 16 17 18 |
# File 'lib/palaver/textbox.rb', line 15 def show cmd = "dialog --textbox '#@filename' #@height #@width" system cmd end |