Class: Depix::InnerField
Overview
Wrapper for a contained structure
Instance Attribute Summary collapse
Attributes inherited from Field
#desc, #name, #req
Instance Method Summary
collapse
Methods inherited from Field
#clean, emit_char, emit_r32, emit_u16, emit_u32, emit_u8, #explain, #initialize
Constructor Details
This class inherits a constructor from Depix::Field
Instance Attribute Details
#cast ⇒ Object
Returns the value of attribute cast.
307
308
309
|
# File 'lib/depix/dict.rb', line 307
def cast
@cast
end
|
Instance Method Details
#consume!(stack) ⇒ Object
318
319
320
|
# File 'lib/depix/dict.rb', line 318
def consume!(stack)
cast.consume!(stack)
end
|
#length ⇒ Object
310
311
312
|
# File 'lib/depix/dict.rb', line 310
def length
cast.length
end
|
#pack(value) ⇒ Object
331
332
333
|
# File 'lib/depix/dict.rb', line 331
def pack(value)
cast.pack(value)
end
|
#pattern ⇒ Object
314
315
316
|
# File 'lib/depix/dict.rb', line 314
def pattern
cast.pattern
end
|
#rtype ⇒ Object
322
323
324
|
# File 'lib/depix/dict.rb', line 322
def rtype
cast
end
|
#validate!(value) ⇒ Object
326
327
328
329
|
# File 'lib/depix/dict.rb', line 326
def validate!(value)
super(value)
cast.validate!(value) if cast.respond_to?(:validate!) && (!value.nil? || req?)
end
|