Module: Pwl::Dialog

Extended by:
Dialog
Included in:
Dialog
Defined in:
lib/pwl/dialog.rb,
lib/pwl/dialog/base.rb,
lib/pwl/dialog/cocoa.rb,
lib/pwl/dialog/gnome.rb,
lib/pwl/dialog/console.rb

Defined Under Namespace

Classes: AppNotFoundError, Base, Cancelled, CocoaDialog, CocoaPasswordDialog, CocoaTextDialog, ConsoleDialog, ConsolePasswordDialog, ConsoleTextDialog, GnomeDialog, GnomePasswordDialog, GnomeTextDialog, Password, SystemDialog, Text

Constant Summary collapse

PLATFORM_PASSWORD_DIALOGS =
{
  :gnome => GnomePasswordDialog,
  :mac   => CocoaPasswordDialog,
}
PLATFORM_TEXT_DIALOGS =
{
  :gnome => GnomeTextDialog,
  :mac   => CocoaTextDialog,
}

Instance Method Summary collapse

Instance Method Details

#gui_platformObject



42
43
44
45
46
47
48
# File 'lib/pwl/dialog.rb', line 42

def gui_platform
  if ENV['GDMSESSION']
    :gnome
  elsif RUBY_PLATFORM =~ /darwin/
    :mac
  end
end