Class: LibSL::LLU8

Inherits:
LLNumber show all
Defined in:
lib/types.rb

Instance Attribute Summary

Attributes inherited from LLNumber

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from LLNumber

endianness, #initialize

Constructor Details

This class inherits a constructor from LibSL::LLNumber

Class Method Details

.decode(data) ⇒ Object



153
154
155
# File 'lib/types.rb', line 153

def self.decode(data)
	LLNumber.decode(data, 'C1a*', LLU8)
end

Instance Method Details

#encodeObject

Raises:

  • (ArgumentError)


157
158
159
160
# File 'lib/types.rb', line 157

def encode()
	raise ArgumentError, "Value out of range: #{@value}" if @value < 0 or @value > 0xff
	super('C')
end