Class: OpenAuth2::Config
- Inherits:
-
Object
- Object
- OpenAuth2::Config
- Defined in:
- lib/open_auth2/config.rb
Overview
Holds the info required to make a valid request to an OAuth server.
Instance Attribute Summary collapse
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#provider_const ⇒ Object
readonly
Returns the value of attribute provider_const.
-
#provider_string ⇒ Object
readonly
Returns the value of attribute provider_string.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Use to set config info.
-
#initialize {|_self| ... } ⇒ Config
constructor
Use to set config info.
- #parse(response_body) ⇒ Object
-
#reset_provider ⇒ Object
Removes all overwritten config & reset to default.
Constructor Details
Instance Attribute Details
#provider ⇒ Object
Returns the value of attribute provider.
6 7 8 |
# File 'lib/open_auth2/config.rb', line 6 def provider @provider end |
#provider_const ⇒ Object (readonly)
Returns the value of attribute provider_const.
6 7 8 |
# File 'lib/open_auth2/config.rb', line 6 def provider_const @provider_const end |
#provider_string ⇒ Object (readonly)
Returns the value of attribute provider_string.
6 7 8 |
# File 'lib/open_auth2/config.rb', line 6 def provider_string @provider_string end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
31 32 33 |
# File 'lib/open_auth2/config.rb', line 31 def configure yield self if block_given? end |
#parse(response_body) ⇒ Object
53 54 55 |
# File 'lib/open_auth2/config.rb', line 53 def parse(response_body) @provider_const.new.parse(self, response_body) end |
#reset_provider ⇒ Object
Removes all overwritten config & reset to default.
48 49 50 51 |
# File 'lib/open_auth2/config.rb', line 48 def reset_provider remove_instance_vars set_default_as_provider end |