Class: Aws::Templates::Utils::Default::Definition::Scheme
- Inherits:
-
Aws::Templates::Utils::Default::Definition
- Object
- Aws::Templates::Utils::Default::Definition
- Aws::Templates::Utils::Default::Definition::Scheme
- Defined in:
- lib/aws/templates/utils/default.rb
Overview
Definition with scheme
Scheme definition can be merged without stacking layers with any other scheme definition. Internal schemes will be merged together producing aggregated scheme. Otherwise, the definition is wither overriden with Scalar or stacked together with Calculable.
Instance Attribute Summary collapse
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Instance Method Summary collapse
- #for(_) ⇒ Object
-
#initialize(scheme) ⇒ Scheme
constructor
A new instance of Scheme.
- #merge(b) ⇒ Object
Methods inherited from Aws::Templates::Utils::Default::Definition
empty, from, #override?, #to_definition
Constructor Details
#initialize(scheme) ⇒ Scheme
Returns a new instance of Scheme.
100 101 102 |
# File 'lib/aws/templates/utils/default.rb', line 100 def initialize(scheme) @scheme = scheme end |
Instance Attribute Details
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
98 99 100 |
# File 'lib/aws/templates/utils/default.rb', line 98 def scheme @scheme end |
Instance Method Details
#for(_) ⇒ Object
114 115 116 |
# File 'lib/aws/templates/utils/default.rb', line 114 def for(_) scheme end |
#merge(b) ⇒ Object
104 105 106 107 108 109 110 111 112 |
# File 'lib/aws/templates/utils/default.rb', line 104 def merge(b) if b.is_a? self.class merge(b.scheme) elsif Utils.recursive?(b) self.class.new(Utils.merge(scheme, b) { |left, right| _merge(left, right) }) else super(b) end end |