mirror of
https://github.com/omniauth/omniauth.git
synced 2022-11-09 12:31:49 -05:00
simplifies OmniAuth::Strategy.default_options
This commit is contained in:
parent
5121fde10d
commit
08a3e4c036
1 changed files with 2 additions and 3 deletions
|
@ -21,9 +21,8 @@ module OmniAuth
|
|||
# Returns an inherited set of default options set at the class-level
|
||||
# for each strategy.
|
||||
def default_options
|
||||
return @default_options if instance_variable_defined?(:@default_options) && @default_options
|
||||
existing = superclass.respond_to?(:default_options) ? superclass.default_options : {}
|
||||
@default_options = OmniAuth::Strategy::Options.new(existing)
|
||||
existing = superclass.default_options if superclass.respond_to?(:default_options)
|
||||
@default_options ||= OmniAuth::Strategy::Options.new(existing)
|
||||
end
|
||||
|
||||
# This allows for more declarative subclassing of strategies by allowing
|
||||
|
|
Loading…
Reference in a new issue