Class: ReverseTunnel::Message::OpenTunnel

Inherits:
ReverseTunnel::Message show all
Defined in:
lib/reverse-tunnel/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ReverseTunnel::Message

create, #pack, #type, type, type_id, #type_id, types, unpack

Constructor Details

#initialize(token = nil) ⇒ OpenTunnel

Returns a new instance of OpenTunnel.



109
110
111
# File 'lib/reverse-tunnel/message.rb', line 109

def initialize(token = nil)
  self.token = token
end

Instance Attribute Details

#tokenObject

Returns the value of attribute token.



107
108
109
# File 'lib/reverse-tunnel/message.rb', line 107

def token
  @token
end

Instance Method Details

#load(payload) ⇒ Object



117
118
119
# File 'lib/reverse-tunnel/message.rb', line 117

def load(payload)
  self.token = payload.first
end

#payloadObject



113
114
115
# File 'lib/reverse-tunnel/message.rb', line 113

def payload
  [token]
end