class BinData::Record
def define_field_accessors(fields) #:nodoc:
Removing this method will not have any effect on correctness.
Struct#method_missing. This is purely a speed optimisation.
Defines accessor methods to avoid the overhead of going through
def define_field_accessors(fields) #:nodoc: unless method_defined?(:bindata_defined_accessors_for_fields?) fields.each_with_index do |field, i| name = field.name_as_sym if name define_field_accessors_for(name, i) end end define_method(:bindata_defined_accessors_for_fields?) { true } end end