Class: Depix::Binary::Fields::BlankingField
Overview
For reserved fields and blanking
Instance Attribute Summary
Attributes inherited from Field
#desc, #length, #name, #req
Instance Method Summary
collapse
Methods inherited from CharField
#initialize
Methods inherited from Field
#consume!, #explain, #initialize
Instance Method Details
#clean(v) ⇒ Object
251
252
253
|
# File 'lib/depix/binary/fields.rb', line 251
def clean(v)
nil
end
|
#pack(value) ⇒ Object
259
260
261
|
# File 'lib/depix/binary/fields.rb', line 259
def pack(value)
0xFF.chr * length
end
|
#pattern ⇒ Object
247
248
249
|
# File 'lib/depix/binary/fields.rb', line 247
def pattern
"Z#{length}"
end
|
#rtype ⇒ Object
255
256
257
|
# File 'lib/depix/binary/fields.rb', line 255
def rtype
NilClass
end
|
#validate!(value) ⇒ Object
243
244
245
|
# File 'lib/depix/binary/fields.rb', line 243
def validate!(value)
raise "The value of this field should be nil" unless value.nil?
end
|