Class: Qt::BlockInvocation

Inherits:
Object show all
Defined in:
lib/qt/qtruby4.rb

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #^, #methods, #protected_methods, #public_methods, q_classinfo, q_signal, q_slot, signals, #singleton_methods, slots, #|, #~

Constructor Details

#initialize(target, block, signature) ⇒ BlockInvocation

Returns a new instance of BlockInvocation.



2045
2046
2047
2048
2049
2050
2051
2052
# File 'lib/qt/qtruby4.rb', line 2045

def initialize(target, block, signature)
  super(target)
  if metaObject.indexOfSlot(signature) == -1
    self.class.slots signature
  end
  @target = target
  @block = block
end

Instance Method Details

#invoke(*args) ⇒ Object



2054
2055
2056
# File 'lib/qt/qtruby4.rb', line 2054

def invoke(*args)
  @target.instance_exec(*args, &@block)
end