Class: ThreeScaleToolbox::CRD::ProductDeploymentParser::ApicastSelfManagedParser

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cr) ⇒ ApicastSelfManagedParser

Returns a new instance of ApicastSelfManagedParser.



29
30
31
32
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 29

def initialize(cr)
  @cr = cr
  @authentication_parser = AuthenticationParser.new(cr.fetch('authentication', {}))
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



46
47
48
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 46

def method_missing(name, *args)
  authentication_parser.public_send(name, *args)
end

Instance Attribute Details

#authentication_parserObject (readonly)

Returns the value of attribute authentication_parser.



27
28
29
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 27

def authentication_parser
  @authentication_parser
end

#crObject (readonly)

Returns the value of attribute cr.



27
28
29
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 27

def cr
  @cr
end

Instance Method Details

#deployment_optionObject



34
35
36
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 34

def deployment_option
  'self_managed'
end

#endpointObject



38
39
40
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 38

def endpoint
  cr['productionPublicBaseURL']
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 50

def respond_to_missing?(method_name, include_private = false)
  super
end

#sandbox_endpointObject



42
43
44
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 42

def sandbox_endpoint
  cr['stagingPublicBaseURL']
end