Class: Pwl::Dialog::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/pwl/dialog.rb

Class Method Summary collapse

Class Method Details

.new(title, prompt) ⇒ Object

Factory method that creates a new text (input) dialog that suits the current GUI platform. If no implementation was found for the current platform, a ConsoleTextDialog is returned.



36
37
38
# File 'lib/pwl/dialog.rb', line 36

def new(title, prompt)
  (PLATFORM_TEXT_DIALOGS[Dialog.gui_platform] || ConsoleTextDialog).new(title, prompt)
end