Class: BlockTest
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from MixinTest
#getMixingTestValue, #setMixingTestValue
Constructor Details
#initialize(&block) ⇒ BlockTest
Returns a new instance of BlockTest.
21
22
23
|
# File 'lib/blocktest.rb', line 21
def initialize(&block)
@callback = block
end
|
Instance Attribute Details
#testValue ⇒ Object
Returns the value of attribute testValue.
17
18
19
|
# File 'lib/blocktest.rb', line 17
def testValue
@testValue
end
|
Instance Method Details
#call(&block) ⇒ Object
29
30
31
|
# File 'lib/blocktest.rb', line 29
def call(&block)
block.call
end
|
#ieval(&block) ⇒ Object
33
34
35
|
# File 'lib/blocktest.rb', line 33
def ieval(&block)
self.instance_eval(&block)
end
|
#ievaldef ⇒ Object
37
38
39
|
# File 'lib/blocktest.rb', line 37
def ievaldef
self.instance_eval(&@callback)
end
|
#testMethod(val) ⇒ Object
25
26
27
|
# File 'lib/blocktest.rb', line 25
def testMethod(val)
@testValue = val
end
|