class Depix::Binary::Fields::U8Field
uint8 field
Constants
- BLANK
Public Instance Methods
clean(v)
click to toggle source
# File lib/depix/binary/fields.rb, line 107 def clean(v) (v == BLANK || v == -1) ? nil : v end
length()
click to toggle source
# File lib/depix/binary/fields.rb, line 99 def length 1 end
pattern()
click to toggle source
# File lib/depix/binary/fields.rb, line 95 def pattern "c" end
rtype()
click to toggle source
# File lib/depix/binary/fields.rb, line 103 def rtype Integer end
validate!(value)
click to toggle source
Calls superclass method
Depix::Binary::Fields::Field#validate!
# File lib/depix/binary/fields.rb, line 111 def validate!(value) super(value) raise "#{name} value #{value} out of bounds for 8 bit unsigned int".lstrip if (!value.nil? && (value < 0 || value >= BLANK)) end