Class: Palaver::TextBox

Inherits:
Base
  • Object
show all
Defined in:
lib/palaver/textbox.rb

Instance Method Summary collapse

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(options)
  super options
  options.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

#showObject



15
16
17
18
# File 'lib/palaver/textbox.rb', line 15

def show
  cmd = "dialog #@common_options --textbox '#@filename' #@height #@width"
  system cmd
end