Class: Gtk::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbit/action.rb

Instance Method Summary collapse

Instance Method Details

#_activateObject


23
# File 'lib/rabbit/action.rb', line 23

alias _activate activate

#activate(&block) ⇒ Object


24
25
26
27
28
29
# File 'lib/rabbit/action.rb', line 24

def activate(&block)
  @block = block
  _activate
ensure
  @block = nil
end

#block_given?Boolean

Returns:

  • (Boolean)

31
32
33
# File 'lib/rabbit/action.rb', line 31

def block_given?
  not @block.nil?
end

#call(*args, &block) ⇒ Object


35
36
37
# File 'lib/rabbit/action.rb', line 35

def call(*args, &block)
  @block.call(*args, &block)
end