Class: Gtk::Action

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

Instance Method Summary collapse

Instance Method Details

#_activateObject

[View source]

29
# File 'lib/rabbit/gtk.rb', line 29

alias _activate activate

#activate(&block) ⇒ Object

[View source]

30
31
32
33
34
35
# File 'lib/rabbit/gtk.rb', line 30

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

#block_given?Boolean

Returns:

  • (Boolean)
[View source]

37
38
39
# File 'lib/rabbit/gtk.rb', line 37

def block_given?
  not @block.nil?
end

#call(*args, &block) ⇒ Object

[View source]

41
42
43
# File 'lib/rabbit/gtk.rb', line 41

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