Class: Rack::Session::SessionId
- Inherits:
-
Object
- Object
- Rack::Session::SessionId
- Defined in:
- lib/rack/session/abstract/id.rb
Direct Known Subclasses
Constant Summary collapse
- ID_VERSION =
2
Instance Attribute Summary collapse
-
#public_id ⇒ Object
(also: #cookie_value, #to_s)
readonly
Returns the value of attribute public_id.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(public_id) ⇒ SessionId
constructor
A new instance of SessionId.
- #inspect ⇒ Object
- #private_id ⇒ Object
Constructor Details
#initialize(public_id) ⇒ SessionId
Returns a new instance of SessionId.
26 27 28 |
# File 'lib/rack/session/abstract/id.rb', line 26 def initialize(public_id) @public_id = public_id end |
Instance Attribute Details
#public_id ⇒ Object (readonly) Also known as: to_s ,
Returns the value of attribute public_id.
24 25 26 |
# File 'lib/rack/session/abstract/id.rb', line 24 def public_id @public_id end |
Instance Method Details
#empty? ⇒ Boolean
37 |
# File 'lib/rack/session/abstract/id.rb', line 37 def empty?; false; end |
#inspect ⇒ Object
38 |
# File 'lib/rack/session/abstract/id.rb', line 38 def inspect; public_id.inspect; end |
#private_id ⇒ Object
30 31 32 |
# File 'lib/rack/session/abstract/id.rb', line 30 def private_id "#{ID_VERSION}::#{hash_sid(public_id)}" end |