Class: Reactor::Session::State

Inherits:
Struct
  • Object
show all
Defined in:
lib/reactor/session.rb

Direct Known Subclasses

Reactor::SessionHelper::SessionState

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#session_idObject

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



10
11
12
# File 'lib/reactor/session.rb', line 10

def session_id
  @session_id
end

#user_nameObject

Returns the value of attribute user_name

Returns:

  • (Object)

    the current value of user_name



10
11
12
# File 'lib/reactor/session.rb', line 10

def user_name
  @user_name
end

Class Method Details

.deserialize(array) ⇒ Object



15
16
17
# File 'lib/reactor/session.rb', line 15

def self.deserialize(array)
  new(*array)
end

Instance Method Details

#serializeObject



11
12
13
# File 'lib/reactor/session.rb', line 11

def serialize
  [user_name, session_id]
end