123456789_123456789_123456789_123456789_123456789_

Class: ActionDispatch::Request::Session::Options

Do not use. This class is for internal use only.
Relationships & Source Files
Inherits: Object
Defined in: actionpack/lib/action_dispatch/request/session.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(by, default_options) ⇒ Options

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 56

def initialize(by, default_options)
  @by       = by
  @delegate = default_options.dup
end

Class Method Details

.find(req)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 52

def self.find(req)
  req.get_header ENV_SESSION_OPTIONS_KEY
end

.set(req, options)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 48

def self.set(req, options)
  req.set_header ENV_SESSION_OPTIONS_KEY, options
end

Instance Method Details

#[](key)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 61

def [](key)
  @delegate[key]
end

#[]=(k, v)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 71

def []=(k, v);        @delegate[k] = v; end

#id(req)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 65

def id(req)
  @delegate.fetch(:id) {
    @by.send(:extract_session_id, req)
  }
end

#to_hash

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 72

def to_hash;          @delegate.dup; end

#values_at(*args)

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/request/session.rb', line 73

def values_at(*args); @delegate.values_at(*args); end