Class: ThreeScaleToolbox::CRD::ProductDeploymentParser
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::CRD::ProductDeploymentParser
- Defined in:
- lib/3scale_toolbox/crds/product_deployment_parser.rb
Overview
ProductDeploymentCRDParser parses CRD Format github.com/3scale/3scale-operator/blob/3scale-2.10.0-CR2/doc/product-reference.md#productdeploymentspec
Defined Under Namespace
Classes: ApicastHostedParser, ApicastSelfManagedParser, AppKeyParser, AuthenticationFlowParser, AuthenticationParser, GatewayResponseParser, OidcParser, SecurityParser, UserKeyParser
Instance Attribute Summary collapse
-
#deployment_parser ⇒ Object
readonly
Returns the value of attribute deployment_parser.
Instance Method Summary collapse
-
#initialize(cr) ⇒ ProductDeploymentParser
constructor
A new instance of ProductDeploymentParser.
- #method_missing(name, *args) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(cr) ⇒ ProductDeploymentParser
Returns a new instance of ProductDeploymentParser.
310 311 312 313 314 315 316 317 318 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 310 def initialize(cr) @deployment_parser = if cr.has_key? 'apicastSelfManaged' ApicastSelfManagedParser.new(cr.fetch('apicastSelfManaged')) elsif cr.has_key? 'apicastHosted' ApicastHostedParser.new(cr.fetch('apicastHosted')) else raise ThreeScaleToolbox::Error, "Unknown deployment option: #{cr.keys}" end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
320 321 322 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 320 def method_missing(name, *args) deployment_parser.public_send(name, *args) end |
Instance Attribute Details
#deployment_parser ⇒ Object (readonly)
Returns the value of attribute deployment_parser.
308 309 310 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 308 def deployment_parser @deployment_parser end |
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
324 325 326 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 324 def respond_to_missing?(method_name, include_private = false) super end |