class BlockTest

Attributes

testValue[RW]

Public Class Methods

new(&block) click to toggle source
# File lib/blocktest.rb, line 21
def initialize(&block)
    @callback = block
end

Public Instance Methods

call(&block) click to toggle source
# File lib/blocktest.rb, line 29
def call(&block)
    block.call
end
ieval(&block) click to toggle source
# File lib/blocktest.rb, line 33
def ieval(&block)
    self.instance_eval(&block)
end
ievaldef() click to toggle source
# File lib/blocktest.rb, line 37
def ievaldef
    self.instance_eval(&@callback)
end
testMethod(val) click to toggle source
# File lib/blocktest.rb, line 25
def testMethod(val)
    @testValue = val
end