dmendel/bindata — pull request #17 by jlukas (2013-11-21 21:54:52+00:00)
Title: Add support for record and multiendian

record can be used to specify dynamic types as fields of a record or struct:

```ruby
def type(arguments)
BinData::Struct(...)
end

class A < BinData::Record
record :field, type: type(arguments)
end
```

multiendian can be used to automatically duplicate a type for big and little endian

```ruby
BinData::Record.multiendian(:type_name) do
uint32 :field
end

class A < BinData::Record
endian :little
type_name :field # knows to use little-endian version of type_name
end

class B < BinData::Record
endian :big
type_name :field # knows to use big-endian version of type_name
end
```