Class: MittensUi::Alert
- Inherits:
-
Object
- Object
- MittensUi::Alert
- Defined in:
- lib/mittens_ui/alert.rb
Overview
A modal alert dialog that displays a message and an OK button. Wraps Gtk::AlertDialog. Opens immediately on instantiation and blocks until dismissed. Optionally accepts a block that runs after the user closes the dialog.
Instance Method Summary collapse
-
#initialize(message, options = {}) { ... } ⇒ Alert
constructor
Creates and immediately displays an alert dialog.
Constructor Details
#initialize(message, options = {}) { ... } ⇒ Alert
Creates and immediately displays an alert dialog.
29 30 31 32 |
# File 'lib/mittens_ui/alert.rb', line 29 def initialize(, = {}, &block) title = [:title] || 'Alert' open_dialog(, title, &block) end |