Class: LibSL::LLIPPort

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port) ⇒ LLIPPort

Returns a new instance of LLIPPort.



486
487
488
# File 'lib/types.rb', line 486

def initialize(port)
	@port = port
end

Instance Attribute Details

#portObject

Returns the value of attribute port.



485
486
487
# File 'lib/types.rb', line 485

def port
  @port
end

Class Method Details

.decode(data) ⇒ Object



476
477
478
479
# File 'lib/types.rb', line 476

def self.decode(data)
	data = data.unpack('n1a*')
	return self.new(data[0]), data[1]
end

Instance Method Details

#encodeObject



481
482
483
# File 'lib/types.rb', line 481

def encode()
	[@port].pack('n1')
end