Class: Gtk::Dialog

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._cucumber_running_dialogsObject



5
6
7
# File 'lib/gutkumber/gtk/dialog.rb', line 5

def _cucumber_running_dialogs
  @_cucumber_running_dialogs ||= []
end

Instance Method Details

#run(*args, &block) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/gutkumber/gtk/dialog.rb', line 10

def run(*args, &block)
  show_all
  Dialog._cucumber_running_dialogs << self
  signal_connect('response') do |_, response|
    block.call(response)
    Dialog._cucumber_running_dialogs.delete(self)
  end
end