Method: CTypes::Bitfield::Builder#align
- Defined in:
- lib/ctypes/bitfield/builder.rb
#align(bits) ⇒ Object
136 137 138 139 140 141 142 |
# File 'lib/ctypes/bitfield/builder.rb', line 136 def align(bits) raise Error, "cannot mix `#align` and `#field` in Bitfield layout" unless @offset @offset += bits - (@offset % bits) @layout << "align #{bits}" self end |