Class: Socrates::Core::Session
- Inherits:
-
Object
- Object
- Socrates::Core::Session
- Defined in:
- lib/socrates/core/session.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(client_id: nil, user: nil, channel: nil) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(client_id: nil, user: nil, channel: nil) ⇒ Session
Returns a new instance of Session.
8 9 10 11 12 13 |
# File 'lib/socrates/core/session.rb', line 8 def initialize(client_id: nil, user: nil, channel: nil) @client_id = client_id @user = user @channel = channel @messages = Hash.new { |hash, key| hash[key] = [] } end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
6 7 8 |
# File 'lib/socrates/core/session.rb', line 6 def channel @channel end |
#client_id ⇒ Object
Returns the value of attribute client_id.
6 7 8 |
# File 'lib/socrates/core/session.rb', line 6 def client_id @client_id end |
#messages ⇒ Object
Returns the value of attribute messages.
6 7 8 |
# File 'lib/socrates/core/session.rb', line 6 def @messages end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/socrates/core/session.rb', line 6 def user @user end |