Class: ClipboardManager::NoYes

Inherits:
Such::Dialog
  • Object
show all
Defined in:
lib/clipboard_manager/clipboard_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ NoYes

Returns a new instance of NoYes.



13
14
15
16
17
# File 'lib/clipboard_manager/clipboard_manager.rb', line 13

def initialize(key)
  super
  add_button '_No', Gtk::ResponseType::CANCEL
  add_button '_Yes', Gtk::ResponseType::OK
end

Instance Method Details

#label(key) ⇒ Object



19
20
21
# File 'lib/clipboard_manager/clipboard_manager.rb', line 19

def label(key)
  Such::Label.new child, key
end

#ok?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
28
# File 'lib/clipboard_manager/clipboard_manager.rb', line 23

def ok?
  show_all
  response = run
  destroy
  response == Gtk::ResponseType::OK
end