Class: Qt::BlockInvocation

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

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #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.



2402
2403
2404
2405
2406
2407
2408
2409
# File 'lib/Qt/qtruby4.rb', line 2402

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



2411
2412
2413
# File 'lib/Qt/qtruby4.rb', line 2411

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