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.
306
307
308
|
# File 'lib/depix/dict.rb', line 306
def cast
@cast
end
|
Instance Method Details
#consume!(stack) ⇒ Object
317
318
319
|
# File 'lib/depix/dict.rb', line 317
def consume!(stack)
cast.consume!(stack)
end
|
#length ⇒ Object
309
310
311
|
# File 'lib/depix/dict.rb', line 309
def length
cast.length
end
|
#pack(value) ⇒ Object
330
331
332
|
# File 'lib/depix/dict.rb', line 330
def pack(value)
cast.pack(value)
end
|
#pattern ⇒ Object
313
314
315
|
# File 'lib/depix/dict.rb', line 313
def pattern
cast.pattern
end
|
#rtype ⇒ Object
321
322
323
|
# File 'lib/depix/dict.rb', line 321
def rtype
cast
end
|
#validate!(value) ⇒ Object
325
326
327
328
|
# File 'lib/depix/dict.rb', line 325
def validate!(value)
super(value)
cast.validate!(value) if cast.respond_to?(:validate!) && (!value.nil? || req?)
end
|