Method: BitStruct::Vector.default_options
- Defined in:
- lib/bit-struct/vector.rb
.default_options(h = nil) ⇒ Object
Get or set the hash of default options for the class, which apply to all fields in the entries. If h is provided, update the default options with that hash. Default options are inherited.
This is especially useful with the :endian => val option.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/bit-struct/vector.rb', line 63 def h = nil ||= superclass..dup if h .merge! h if @struct_class @struct_class. h end end end |