Class: Qt::BlockInvocation

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

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #[email protected], #/, #<, #<<, #<=, #==, #>, #>=, #>>, #QCOMPARE, #QEXPECT_FAIL, #QFAIL, #QSKIP, #QTEST, #QVERIFY, #QVERIFY2, #QWARN, #^, ancestors, #is_a?, #methods, private_slots, #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


2459
2460
2461
2462
2463
2464
2465
# File 'lib/Qt/qtruby4.rb', line 2459

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

Instance Method Details

#invoke(*args) ⇒ Object


2467
2468
2469
# File 'lib/Qt/qtruby4.rb', line 2467

def invoke(*args)
  @block.call(*args)
end