Class: RainforestRubyRuntime::Variables::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/rainforest_ruby_runtime/variables/value.rb

Direct Known Subclasses

Scope

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, &block) ⇒ Value

Returns a new instance of Value.



6
7
8
9
# File 'lib/rainforest_ruby_runtime/variables/value.rb', line 6

def initialize(name, &block)
  @name = name
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



4
5
6
# File 'lib/rainforest_ruby_runtime/variables/value.rb', line 4

def block
  @block
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/rainforest_ruby_runtime/variables/value.rb', line 4

def name
  @name
end

Instance Method Details

#call(*args, &block) ⇒ Object



11
12
13
# File 'lib/rainforest_ruby_runtime/variables/value.rb', line 11

def call(*args, &block)
  @block.call *args, &block
end