Class: MastercardCoreSdk::OAuth::OAuthParameters
- Inherits:
-
Object
- Object
- MastercardCoreSdk::OAuth::OAuthParameters
- Defined in:
- lib/mastercard_core_sdk/oauth/oauth_parameters.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#add_parameter(key, value) ⇒ Object
Adds a parameter to the hash and as an instance variable to the class.
-
#initialize ⇒ OAuthParameters
constructor
A new instance of OAuthParameters.
Constructor Details
#initialize ⇒ OAuthParameters
Returns a new instance of OAuthParameters.
6 7 8 |
# File 'lib/mastercard_core_sdk/oauth/oauth_parameters.rb', line 6 def initialize self.params = Hash.new end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'lib/mastercard_core_sdk/oauth/oauth_parameters.rb', line 5 def params @params end |
Instance Method Details
#add_parameter(key, value) ⇒ Object
Adds a parameter to the hash and as an instance variable to the class
11 12 13 14 15 16 |
# File 'lib/mastercard_core_sdk/oauth/oauth_parameters.rb', line 11 def add_parameter(key, value) self.params[key.to_sym] = value self.class.send(:define_method, key) do value end end |