Class: Colossus::Engine::MemoryThreadSafe::ClientSession
- Inherits:
-
Object
- Object
- Colossus::Engine::MemoryThreadSafe::ClientSession
- Defined in:
- lib/colossus/engines/memory_thread_safe/client_session.rb
Overview
Represent the status and the information of a given user.
Instance Attribute Summary collapse
-
#last_seen ⇒ Object
readonly
Returns the value of attribute last_seen.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize ⇒ ClientSession
constructor
A new instance of ClientSession.
Constructor Details
#initialize ⇒ ClientSession
Returns a new instance of ClientSession.
8 9 10 11 12 |
# File 'lib/colossus/engines/memory_thread_safe/client_session.rb', line 8 def initialize @data = ThreadSafe::Cache.new @data[:status] = DISCONNECTED @data[:last_seen] = Time.now end |
Instance Attribute Details
#last_seen ⇒ Object (readonly)
Returns the value of attribute last_seen.
6 7 8 |
# File 'lib/colossus/engines/memory_thread_safe/client_session.rb', line 6 def last_seen @last_seen end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/colossus/engines/memory_thread_safe/client_session.rb', line 6 def status @status end |