Class: Devise::OmniAuth::Config
- Inherits:
-
Object
- Object
- Devise::OmniAuth::Config
- Defined in:
- lib/devise/omniauth/config.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
Instance Method Summary collapse
-
#initialize(provider, args) ⇒ Config
constructor
A new instance of Config.
- #strategy_class ⇒ Object
-
#strategy_name ⇒ Object
open_id strategy can have configurable name.
Constructor Details
#initialize(provider, args) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 |
# File 'lib/devise/omniauth/config.rb', line 7 def initialize(provider, args) @provider = provider @args = args @strategy = nil end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/devise/omniauth/config.rb', line 5 def args @args end |
#strategy ⇒ Object
Returns the value of attribute strategy.
4 5 6 |
# File 'lib/devise/omniauth/config.rb', line 4 def strategy @strategy end |
Instance Method Details
#strategy_class ⇒ Object
19 20 21 |
# File 'lib/devise/omniauth/config.rb', line 19 def strategy_class ::OmniAuth::Strategies.const_get("#{::OmniAuth::Utils.camelize(@provider.to_s)}") end |
#strategy_name ⇒ Object
open_id strategy can have configurable name
14 15 16 17 |
# File 'lib/devise/omniauth/config.rb', line 14 def strategy_name = @args.last.is_a?(Hash) && @args.last && [:name] ? [:name] : @provider end |