# class Rack::Session::Abstract::ID

### Public Class Methods

inherited(klass) click to toggle source
Calls superclass method

    # File lib/rack/session/abstract/id.rb, line 488
    def self.inherited(klass)
      k = klass.ancestors.find { |kl| kl.respond_to?(:superclass) && kl.superclass == ID }
      unless k.instance_variable_defined?(:"@_rack_warned")
        warn "#{klass} is inheriting from #{ID}.  Inheriting from #{ID} is deprecated, please inherit from #{Persisted} instead" if $VERBOSE
        k.instance_variable_set(:"@_rack_warned", true)
      end
      super
    end

### Public Instance Methods

delete_session(req, sid, options) click to toggle source

All thread safety and session destroy procedures should occur here. Should return a new session id or nil if options

    # File lib/rack/session/abstract/id.rb, line 517
    def delete_session(req, sid, options)
      destroy_session req.env, sid, options
    end

find_session(req, sid) click to toggle source

All thread safety and session retrieval procedures should occur here. Should return [session_id, session]. If nil is provided as the session id, generation of a new valid id should occur within.

    # File lib/rack/session/abstract/id.rb, line 502
    def find_session(req, sid)
      get_session req.env, sid
    end

write_session(req, sid, session, options) click to toggle source

All thread safety and session storage procedures should occur here. Must return the session id if the session was saved successfully, or false if the session could not be saved.

    # File lib/rack/session/abstract/id.rb, line 510
    def write_session(req, sid, session, options)
      set_session req.env, sid, session, options
    end