Class: LibSL::LLS8

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



211
212
213
# File 'lib/types.rb', line 211

def self.decode(data)
	LLNumber.decode(data, 'c1a*', LLS8)
end

Instance Method Details

#encodeObject

Raises:

  • (ArgumentError)


215
216
217
218
# File 'lib/types.rb', line 215

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