Class: H3::Bindings::Types::H3IndexesIn
- Inherits:
-
Object
- Object
- H3::Bindings::Types::H3IndexesIn
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/h3/bindings/types.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(set) ⇒ H3IndexesIn
constructor
A new instance of H3IndexesIn.
- #ptr ⇒ Object
Constructor Details
#initialize(set) ⇒ H3IndexesIn
Returns a new instance of H3IndexesIn.
40 41 42 43 |
# File 'lib/h3/bindings/types.rb', line 40 def initialize(set) @size = set.size ptr.write_array_of_ulong_long(set) end |
Instance Attribute Details
#size ⇒ Object (readonly)
Returns the value of attribute size.
38 39 40 |
# File 'lib/h3/bindings/types.rb', line 38 def size @size end |
Class Method Details
.to_native(h3_set_in, _context) ⇒ Object
34 35 36 |
# File 'lib/h3/bindings/types.rb', line 34 def self.to_native(h3_set_in, _context) h3_set_in.ptr end |
Instance Method Details
#ptr ⇒ Object
45 46 47 |
# File 'lib/h3/bindings/types.rb', line 45 def ptr @ptr ||= FFI::MemoryPointer.new(:ulong_long, size) end |