Class: RainforestRubyRuntime::Variables::Value
- Inherits:
-
Object
- Object
- RainforestRubyRuntime::Variables::Value
- Defined in:
- lib/rainforest_ruby_runtime/variables/value.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(*args, &block) ⇒ Object
-
#initialize(name, &block) ⇒ Value
constructor
A new instance of Value.
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
#block ⇒ Object (readonly)
Returns the value of attribute block.
4 5 6 |
# File 'lib/rainforest_ruby_runtime/variables/value.rb', line 4 def block @block end |
#name ⇒ Object (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 |