Class: ThreeScaleToolbox::CRD::ProductDeploymentParser::UserKeyParser
- Inherits:
-
Object
- Object
- ThreeScaleToolbox::CRD::ProductDeploymentParser::UserKeyParser
- Defined in:
- lib/3scale_toolbox/crds/product_deployment_parser.rb
Instance Attribute Summary collapse
-
#cr ⇒ Object
readonly
Returns the value of attribute cr.
-
#gaterway_response_parser ⇒ Object
readonly
Returns the value of attribute gaterway_response_parser.
-
#security_parser ⇒ Object
readonly
Returns the value of attribute security_parser.
Instance Method Summary collapse
- #auth_user_key ⇒ Object
- #backend_version ⇒ Object
- #credentials_location ⇒ Object
-
#initialize(cr) ⇒ UserKeyParser
constructor
A new instance of UserKeyParser.
- #method_missing(name, *args) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(cr) ⇒ UserKeyParser
Returns a new instance of UserKeyParser.
121 122 123 124 125 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 121 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
139 140 141 142 143 144 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 139 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 (readonly)
Returns the value of attribute cr.
119 120 121 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 119 def cr @cr end |
#gaterway_response_parser ⇒ Object (readonly)
Returns the value of attribute gaterway_response_parser.
119 120 121 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 119 def gaterway_response_parser @gaterway_response_parser end |
#security_parser ⇒ Object (readonly)
Returns the value of attribute security_parser.
119 120 121 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 119 def security_parser @security_parser end |
Instance Method Details
#auth_user_key ⇒ Object
131 132 133 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 131 def auth_user_key cr['authUserKey'] end |
#backend_version ⇒ Object
127 128 129 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 127 def backend_version '1' end |
#credentials_location ⇒ Object
135 136 137 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 135 def credentials_location cr['credentials'] end |
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
146 147 148 |
# File 'lib/3scale_toolbox/crds/product_deployment_parser.rb', line 146 def respond_to_missing?(method_name, include_private = false) super end |