Sha256: 90232cc3f0f605b973d31f637fbbed8f3265d764572f25ce8ce97155fdcc90e2

Contents?: true

Size: 691 Bytes

Versions: 11

Compression:

Stored size: 691 Bytes

Contents

module SwitchUser
  module Provider
    autoload :Base, "switch_user/provider/base"
    autoload :Authlogic, "switch_user/provider/authlogic"
    autoload :Clearance, "switch_user/provider/clearance"
    autoload :Devise, "switch_user/provider/devise"
    autoload :RestfulAuthentication, "switch_user/provider/restful_authentication"
    autoload :Sorcery, "switch_user/provider/sorcery"
    autoload :Dummy, "switch_user/provider/dummy"
    autoload :Session, "switch_user/provider/session"

    def self.init(controller)
      klass_part = SwitchUser.provider.to_s.classify
      klass    = "SwitchUser::Provider::#{klass_part}".constantize

      klass.new(controller)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
switch_user-1.3.1 lib/switch_user/provider.rb
switch_user-1.3.0 lib/switch_user/provider.rb
switch_user-1.2.1 lib/switch_user/provider.rb
switch_user-1.2.0 lib/switch_user/provider.rb
switch_user-1.1.0 lib/switch_user/provider.rb
switch_user-1.0.2 lib/switch_user/provider.rb
switch_user-1.0.1 lib/switch_user/provider.rb
switch_user-1.0.0 lib/switch_user/provider.rb
switch_user-0.9.5 lib/switch_user/provider.rb
switch_user-0.9.4 lib/switch_user/provider.rb
switch_user-0.9.3 lib/switch_user/provider.rb