Sha256: 5fcaa1cf84e416407b07c72a6ce84cc3a163feaf6bde6cdabf7db1db1f8de3db

Contents?: true

Size: 787 Bytes

Versions: 14

Compression:

Stored size: 787 Bytes

Contents

# frozen_string_literal: true

# Object for handling session cookies containing cached values
class BrowseEverythingSession
  class ProviderSession < Base
    class_attribute :sessions
    self.sessions = {}

    def self.for(session:, name:)
      ProviderSession.new(session: session, name: name)
    end

    def initialize(session:, name:)
      @name = name
      super(session: session)
    end

    def token=(value)
      @session["#{@name}_token"] = value
    end

    def token
      @session["#{@name}_token"]
    end

    def code=(value)
      @session["#{@name}_code"] = value
    end

    def code
      @session["#{@name}_code"]
    end

    def data=(value)
      @session["#{@name}_data"] = value
    end

    def data
      @session["#{@name}_data"]
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
browse-everything-1.5.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.4.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.3.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.2.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.1.2 app/services/browse_everything_session/provider_session.rb
browse-everything-1.1.1 app/services/browse_everything_session/provider_session.rb
browse-everything-1.1.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.0.2 app/services/browse_everything_session/provider_session.rb
browse-everything-1.0.1 app/services/browse_everything_session/provider_session.rb
browse-everything-1.0.0 app/services/browse_everything_session/provider_session.rb
browse-everything-1.0.0.rc2 app/services/browse_everything_session/provider_session.rb
browse-everything-1.0.0.rc1 app/services/browse_everything_session/provider_session.rb
browse-everything-0.16.1 app/services/browse_everything_session/provider_session.rb
browse-everything-0.16.0 app/services/browse_everything_session/provider_session.rb