Class: Aws::Endpoints::TreeRule Private
- Inherits:
-
Object
- Object
- Aws::Endpoints::TreeRule
- Defined in:
- lib/aws-sdk-core/endpoints/tree_rule.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class is deprecated. It is used by the Runtime endpoint resolution approach. It has been replaced by a code generated approach in each service gem. It can be removed in a new major version. It has to exist because old service gems can use a new core version.
Instance Attribute Summary collapse
- #conditions ⇒ Object readonly private
- #documentation ⇒ Object readonly private
- #error ⇒ Object readonly private
- #type ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(type: 'tree', conditions:, rules:, documentation: nil) ⇒ TreeRule
constructor
private
A new instance of TreeRule.
- #match(parameters, assigned = {}) ⇒ Object private
Constructor Details
#initialize(type: 'tree', conditions:, rules:, documentation: nil) ⇒ TreeRule
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TreeRule.
12 13 14 15 16 17 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 12 def initialize(type: 'tree', conditions:, rules:, documentation: nil) @type = type @conditions = Condition.from_json(conditions) @rules = RuleSet.rules_from_json(rules) @documentation = documentation end |
Instance Attribute Details
#conditions ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 20 def conditions @conditions end |
#documentation ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 22 def documentation @documentation end |
#error ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 21 def error @error end |
#type ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 19 def type @type end |
Instance Method Details
#match(parameters, assigned = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 29 30 31 32 |
# File 'lib/aws-sdk-core/endpoints/tree_rule.rb', line 24 def match(parameters, assigned = {}) assigns = assigned.dup matched = conditions.all? do |condition| output = condition.match?(parameters, assigns) assigns = assigns.merge(condition.assigned) if condition.assign output end resolve_rules(parameters, assigns) if matched end |