Class: Megatest::Runtime::Expression

Inherits:
Object
  • Object
show all
Defined in:
lib/megatest/runtime.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string, block) ⇒ Expression

Returns a new instance of Expression.



167
168
169
170
# File 'lib/megatest/runtime.rb', line 167

def initialize(string, block)
  @string = string
  @block = block
end

Instance Attribute Details

#stringObject (readonly)

Returns the value of attribute string.



165
166
167
# File 'lib/megatest/runtime.rb', line 165

def string
  @string
end

Instance Method Details

#callObject



172
173
174
# File 'lib/megatest/runtime.rb', line 172

def call
  eval(@string, @block.binding)
end