Class: Murk::Model::ReferenceStackParameter
- Inherits:
-
Object
- Object
- Murk::Model::ReferenceStackParameter
- Defined in:
- lib/murk/model/stack_parameter.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #env(name) ⇒ Object
-
#initialize(key, block, env: nil) ⇒ ReferenceStackParameter
constructor
A new instance of ReferenceStackParameter.
- #resolve ⇒ Object
- #stack(name) ⇒ Object
Constructor Details
#initialize(key, block, env: nil) ⇒ ReferenceStackParameter
Returns a new instance of ReferenceStackParameter.
29 30 31 32 33 |
# File 'lib/murk/model/stack_parameter.rb', line 29 def initialize(key, block, env: nil) @key = key @block = block @env = env end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
27 28 29 |
# File 'lib/murk/model/stack_parameter.rb', line 27 def block @block end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'lib/murk/model/stack_parameter.rb', line 27 def key @key end |
Instance Method Details
#env(name) ⇒ Object
39 40 41 42 |
# File 'lib/murk/model/stack_parameter.rb', line 39 def env(name) @env = name self end |
#resolve ⇒ Object
35 36 37 |
# File 'lib/murk/model/stack_parameter.rb', line 35 def resolve instance_eval(&@block) end |
#stack(name) ⇒ Object
44 45 46 |
# File 'lib/murk/model/stack_parameter.rb', line 44 def stack(name) Stack.new(name, env: @env) end |