node/lib/metasm/metasm/exe_format/serialstruct.rb
def new_field(name, decode, encode, defval, enum=nil, bits=nil)
		if name
			attr_accessor name
			name = "@#{name}".to_sym
		end
		(@@fields[self] ||= []) << [name, decode, encode, defval, enum, bits]
	end
# defines a new field
# adds an accessor
defines a new field
adds an accessor
defines a new field adds an accessor
def new_field(name, decode, encode, defval, enum=nil, bits=nil)
		if name
			attr_accessor name
			name = "@#{name}".to_sym
		end
		(@@fields[self] ||= []) << [name, decode, encode, defval, enum, bits]
	end
def new_field ( name , decode , encode , defval , enum = nil , bits = nil ) if name attr_accessor name name = "@#{name}" . to_sym end ( @@fields [ self ] ||= [ ] ) << [ name , decode , encode , defval , enum , bits ] end
defines a new field
adds an accessor
defines a new field adds an accessor
name
decode
encode
defval
enum
bits