Class: Murk::Model::ReferenceStackParameter

Inherits:
Object
  • Object
show all
Defined in:
lib/murk/model/stack_parameter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, block, env: nil, user: nil) ⇒ ReferenceStackParameter

Returns a new instance of ReferenceStackParameter.



29
30
31
32
33
34
# File 'lib/murk/model/stack_parameter.rb', line 29

def initialize(key, block, env: nil, user: nil)
  @key = key
  @block = block
  @user = user
  @env = env
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



27
28
29
# File 'lib/murk/model/stack_parameter.rb', line 27

def block
  @block
end

#keyObject (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

#resolveObject



36
37
38
# File 'lib/murk/model/stack_parameter.rb', line 36

def resolve
  instance_eval(&@block)
end

#stack(name) ⇒ Object



40
41
42
# File 'lib/murk/model/stack_parameter.rb', line 40

def stack(name)
  Stack.new(name, env: @env, user: @user)
end