Class: Flann::InitializableStruct
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Flann::InitializableStruct
- Defined in:
- lib/flann.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(pointer = nil, *layout, &block) ⇒ InitializableStruct
constructor
A new instance of InitializableStruct.
Constructor Details
#initialize(pointer = nil, *layout, &block) ⇒ InitializableStruct
Returns a new instance of InitializableStruct.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/flann.rb', line 56 def initialize pointer=nil, *layout, &block if pointer.respond_to?(:each_pair) = pointer pointer = nil else end super(pointer, *layout, &block) if defined?(self.class::DEFAULTS) = self.class::DEFAULTS.merge() end .each_pair do |key, value| self[key] = value end unless .nil? end |