Sha256: 858d2a99aeeabdc3e53b206322528817829928dd4ac0093b0232226f55da663f

Contents?: true

Size: 556 Bytes

Versions: 14

Compression:

Stored size: 556 Bytes

Contents

module SwitchUser
  module Provider
    class Dummy < Base
      def initialize(controller)
        @user = nil
      end

      def login(user, scope = nil)
        @user = user
      end

      def logout(scope = nil)
        @user = nil
      end

      def current_user(scope = nil)
        @user
      end

      def original_user
        @original_user
      end

      def remember_current_user(remember)
        if remember
          @original_user = current_user
        else
          @original_user = nil
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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