Class: ThreeScaleToolbox::CRD::ProductDeploymentParser

Inherits:
Object
  • Object
show all
Defined in:
lib/3scale_toolbox/crds/product_deployment_parser.rb

Overview

Defined Under Namespace

Classes: ApicastHostedParser, ApicastSelfManagedParser, AppKeyParser, AuthenticationFlowParser, AuthenticationParser, GatewayResponseParser, OidcParser, SecurityParser, UserKeyParser

Instance Attribute Summary collapse

Instance Method Summary collapse

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_parserObject (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

Returns:

  • (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