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.
20 21 22 |
# File 'lib/rack/session/abstract/id.rb', line 20 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.
18 19 20 |
# File 'lib/rack/session/abstract/id.rb', line 18 def public_id @public_id end |
Instance Method Details
#empty? ⇒ Boolean
31 |
# File 'lib/rack/session/abstract/id.rb', line 31 def empty?; false; end |
#inspect ⇒ Object
32 |
# File 'lib/rack/session/abstract/id.rb', line 32 def inspect; public_id.inspect; end |
#private_id ⇒ Object
24 25 26 |
# File 'lib/rack/session/abstract/id.rb', line 24 def private_id "#{ID_VERSION}::#{hash_sid(public_id)}" end |