Class: ThreeScaleToolbox::CRD::ProductDeploymentParser::AppKeyParser
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::CRD::ProductDeploymentParser::AppKeyParser
show all
- Defined in:
- lib/3scale_toolbox/crds/product_deployment_parser.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AppKeyParser.
84
85
86
87
88
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 84
def initialize(cr)
@cr = cr
@security_parser = SecurityParser.new(cr.fetch('security', {}))
@gaterway_response_parser = GatewayResponseParser.new(cr.fetch('gatewayResponse', {}))
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
106
107
108
109
110
111
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 106
def method_missing(name, *args)
res = security_parser.public_send(name, *args)
return res unless res.nil?
gaterway_response_parser.public_send(name, *args)
end
|
Instance Attribute Details
#cr ⇒ Object
Returns the value of attribute cr.
82
83
84
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 82
def cr
@cr
end
|
#gaterway_response_parser ⇒ Object
Returns the value of attribute gaterway_response_parser.
82
83
84
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 82
def gaterway_response_parser
@gaterway_response_parser
end
|
#security_parser ⇒ Object
Returns the value of attribute security_parser.
82
83
84
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 82
def security_parser
@security_parser
end
|
Instance Method Details
#auth_app_id ⇒ Object
90
91
92
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 90
def auth_app_id
cr['appID']
end
|
#auth_app_key ⇒ Object
94
95
96
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 94
def auth_app_key
cr['appKey']
end
|
#backend_version ⇒ Object
102
103
104
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 102
def backend_version
'2'
end
|
#credentials_location ⇒ Object
98
99
100
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 98
def credentials_location
cr['credentials']
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
113
114
115
|
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 113
def respond_to_missing?(method_name, include_private = false)
super
end
|