Class: Palaver::Radiolist
- Inherits:
-
ListWithOptions
- Object
- Base
- ListWithOptions
- Palaver::Radiolist
- Defined in:
- lib/palaver/radiolist.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Radiolist
constructor
A new instance of Radiolist.
- #show ⇒ Object
Methods inherited from ListWithOptions
#list_height, #option, #options_string_no_status, #options_string_with_status
Methods inherited from Base
#height, #text, #width, #with_tempfile
Constructor Details
#initialize(options) ⇒ Radiolist
Returns a new instance of Radiolist.
8 9 10 |
# File 'lib/palaver/radiolist.rb', line 8 def initialize() super() end |
Instance Method Details
#show ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/palaver/radiolist.rb', line 12 def show chosen = nil with_tempfile do |fname| cmd = "dialog #@common_options --radiolist '#@text' #@height #@width #@list_height #{} 2> #{fname}" sucess = system cmd if sucess then chosen = File.read(fname) end end return chosen end |