Class: BinData::DSLMixin::StructBlockParser

Inherits:
Object
  • Object
show all
Defined in:
lib/bindata/dsl.rb

Class Method Summary collapse

Class Method Details

.extract_params(endian, &block) ⇒ Object



283
284
285
286
287
288
289
# File 'lib/bindata/dsl.rb', line 283

def self.extract_params(endian, &block)
  parser = DSLParser.new(BinData::Struct, :multiple_fields, :optional_fieldnames, :hidden_fields)
  parser.endian endian
  parser.instance_eval(&block)

  parser.to_struct_params
end