Class: Aws::Templates::Utils::LateBound::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/templates/utils/late_bound.rb

Overview

Reference

Reference is a special placeholder object designed to point to the object reference was created for with optional path and args attached.

References are used when the final value of an object property is unknown at the template calculation stage and can be extracted only when the final rendered view is submitted to the target system (late binding)

Constant Summary collapse

FAILURE_MESSAGES =
{
  to_s: 'string',
  to_i: 'integer',
  to_f: 'float',
  to_a: 'array',
  to_h: 'hash',
  to_str: 'string',
  to_int: 'integer',
  to_ary: 'array',
  to_hash: 'hash',
  to_proc: 'proc'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_instance, target_path = nil, args = nil) ⇒ Reference

Returns a new instance of Reference.



54
55
56
57
58
# File 'lib/aws/templates/utils/late_bound.rb', line 54

def initialize(target_instance, target_path = nil, args = nil)
  @instance = target_instance
  @path = target_path
  @arguments = args
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



29
30
31
# File 'lib/aws/templates/utils/late_bound.rb', line 29

def arguments
  @arguments
end

#instanceObject (readonly)

Returns the value of attribute instance.



27
28
29
# File 'lib/aws/templates/utils/late_bound.rb', line 27

def instance
  @instance
end

#pathObject (readonly)

Returns the value of attribute path.



28
29
30
# File 'lib/aws/templates/utils/late_bound.rb', line 28

def path
  @path
end