Class: Wampproto::SessionDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/wampproto/session_details.rb

Overview

Session Details

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session_id, realm, authid, authrole) ⇒ SessionDetails

Returns a new instance of SessionDetails.



8
9
10
11
12
13
# File 'lib/wampproto/session_details.rb', line 8

def initialize(session_id, realm, authid, authrole)
  @session_id = session_id
  @realm = realm
  @authid = authid
  @authrole = authrole
end

Instance Attribute Details

#authidObject (readonly)

Returns the value of attribute authid.



6
7
8
# File 'lib/wampproto/session_details.rb', line 6

def authid
  @authid
end

#authroleObject (readonly)

Returns the value of attribute authrole.



6
7
8
# File 'lib/wampproto/session_details.rb', line 6

def authrole
  @authrole
end

#realmObject (readonly)

Returns the value of attribute realm.



6
7
8
# File 'lib/wampproto/session_details.rb', line 6

def realm
  @realm
end

#session_idObject (readonly)

Returns the value of attribute session_id.



6
7
8
# File 'lib/wampproto/session_details.rb', line 6

def session_id
  @session_id
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/wampproto/session_details.rb', line 15

def ==(other)
  return false unless other.instance_of?(SessionDetails)

  session_id == other.session_id &&
    realm == other.realm &&
    authid == other.authid &&
    authrole == other.authrole
end