Class: Mastercard::Common::OAuthParameters
- Inherits:
-
Object
- Object
- Mastercard::Common::OAuthParameters
- Defined in:
- lib/mastercard_api/common/oauth_parameters.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#add_parameter(key, value) ⇒ Object
add 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.
8 9 10 |
# File 'lib/mastercard_api/common/oauth_parameters.rb', line 8 def initialize() self.params = Hash.new end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
6 7 8 |
# File 'lib/mastercard_api/common/oauth_parameters.rb', line 6 def params @params end |
Instance Method Details
#add_parameter(key, value) ⇒ Object
add a parameter to the hash and as an instance variable to the class
13 14 15 16 17 18 |
# File 'lib/mastercard_api/common/oauth_parameters.rb', line 13 def add_parameter(key, value) self.params[key.to_sym] = value self.class.send(:define_method, key) do value end end |