Class: Palaver::Pause

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

Instance Method Summary collapse

Methods inherited from Base

#height, #text, #width, #with_tempfile

Constructor Details

#initialize(options) ⇒ Pause

Returns a new instance of Pause.



6
7
8
9
10
11
12
13
14
# File 'lib/palaver/pause.rb', line 6

def initialize(options)
  super(options)
  @seconds = 0
  options.each do |option,value|
    case option
    when :seconds then @seconds = value
    end
  end
end

Instance Method Details

#seconds(val) ⇒ Object



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

def seconds(val)
  @seconds = val
end

#showObject



20
21
22
23
24
# File 'lib/palaver/pause.rb', line 20

def show
  cmd = "dialog #@common_options --pause '#@text' #@height #@width #@seconds"
  rc = system cmd
  return rc
end