Class: My

Inherits:
Object
  • Object
show all
Includes:
DialogTui
Defined in:
lib/dialog_tui.rb

Constant Summary

Constants included from DialogTui

DialogTui::VERSION

Instance Method Summary collapse

Methods included from DialogTui

dialog

Instance Method Details

#actObject



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/dialog_tui.rb', line 150

def act
  
  dialog {
  
    option '1. hey' do
      puts 'you choose the first one!'
    end
  
    option '2. hi!' do
      puts 'you choose the second one!'
    end
  
    option '3. bye' do
      puts '*waving*'
    end
  }.
  tap { |result|
    raise unless result.nil?
    # because it works for effect, not for return value
  }
  
end