Class: ReverseTunnel::Message::Data
- Inherits:
-
ReverseTunnel::Message
- Object
- ReverseTunnel::Message
- ReverseTunnel::Message::Data
- Defined in:
- lib/reverse-tunnel/message.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
Instance Method Summary collapse
-
#initialize(session_id = nil, data = nil) ⇒ Data
constructor
A new instance of Data.
- #load(payload) ⇒ Object
- #payload ⇒ Object
Methods inherited from ReverseTunnel::Message
create, #pack, #type, type, type_id, #type_id, types, unpack
Constructor Details
#initialize(session_id = nil, data = nil) ⇒ Data
Returns a new instance of Data.
75 76 77 78 |
# File 'lib/reverse-tunnel/message.rb', line 75 def initialize(session_id = nil, data = nil) self.session_id = session_id self.data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
73 74 75 |
# File 'lib/reverse-tunnel/message.rb', line 73 def data @data end |
#session_id ⇒ Object
Returns the value of attribute session_id.
73 74 75 |
# File 'lib/reverse-tunnel/message.rb', line 73 def session_id @session_id end |
Instance Method Details
#load(payload) ⇒ Object
84 85 86 |
# File 'lib/reverse-tunnel/message.rb', line 84 def load(payload) self.session_id, self.data = payload end |
#payload ⇒ Object
80 81 82 |
# File 'lib/reverse-tunnel/message.rb', line 80 def payload [session_id, data] end |