Class: Gtk::Action
- Inherits:
-
Object
- Object
- Gtk::Action
- Defined in:
- lib/rabbit/gtk.rb,
lib/rabbit/action.rb
Instance Method Summary collapse
- #_activate ⇒ Object
- #activate(&block) ⇒ Object
- #block_given? ⇒ Boolean
- #call(*args, &block) ⇒ Object
-
#initialize(name, options = {}) ⇒ Action
constructor
A new instance of Action.
- #initialize_raw ⇒ Object
Constructor Details
#initialize(name, options = {}) ⇒ Action
Returns a new instance of Action.
91 92 93 94 95 96 97 |
# File 'lib/rabbit/gtk.rb', line 91 def initialize(name, ={}) initialize_raw(name, [:label], [:tooltip], [:stock_id]) end |
Instance Method Details
#_activate ⇒ Object
5 |
# File 'lib/rabbit/action.rb', line 5 alias _activate activate |
#activate(&block) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/rabbit/action.rb', line 6 def activate(&block) @block = block _activate ensure @block = nil end |
#block_given? ⇒ Boolean
13 14 15 |
# File 'lib/rabbit/action.rb', line 13 def block_given? not @block.nil? end |
#call(*args, &block) ⇒ Object
17 18 19 |
# File 'lib/rabbit/action.rb', line 17 def call(*args, &block) @block.call(*args, &block) end |
#initialize_raw ⇒ Object
90 |
# File 'lib/rabbit/gtk.rb', line 90 alias_method :initialize_raw, :initialize |