Method: FFIDB::Struct#initialize

Defined in:
lib/ffidb/struct.rb

#initialize(name, fields = {}, comment = nil) ⇒ Struct

Returns a new instance of Struct.

Parameters:

  • name (Symbol, #to_sym)
  • fields (Map<Symbol, Type>) (defaults to: {})
  • comment (String, #to_s) (defaults to: nil)


13
14
15
# File 'lib/ffidb/struct.rb', line 13

def initialize(name, fields = {}, comment = nil)
  super(name.to_sym, fields || {}, comment&.to_s)
end