Class: LibSL::LLFixed

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(data) ⇒ LLFixed

Returns a new instance of LLFixed.



92
93
94
# File 'lib/types.rb', line 92

def initialize(data)
	@data = data
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



91
92
93
# File 'lib/types.rb', line 91

def data
  @data
end

Class Method Details

.decode(data, len) ⇒ Object



82
83
84
85
# File 'lib/types.rb', line 82

def self.decode(data, len)
	data = data.unpack("a#{len}a*")
	return self.new(data[0]), data[1]
end

Instance Method Details

#encodeObject



87
88
89
# File 'lib/types.rb', line 87

def encode()
	@data
end