Class: Proj::Api::PJ_AXIS_DESCRIPTION

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/api/api_experimental.rb

Class Method Summary collapse

Class Method Details

.create(name:, abbreviation:, direction:, unit_name:, unit_conv_factor:, unit_type:) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'lib/api/api_experimental.rb', line 30

def self.create(name:, abbreviation:, direction:, unit_name:, unit_conv_factor:, unit_type:)
  result = PJ_AXIS_DESCRIPTION.new
  result[:name] = FFI::MemoryPointer.from_string(name)
  result[:abbreviation] = FFI::MemoryPointer.from_string(abbreviation)
  result[:direction] = FFI::MemoryPointer.from_string(direction)
  result[:unit_name] = FFI::MemoryPointer.from_string(unit_name)
  result[:unit_conv_factor] = unit_conv_factor
  result[:unit_type] = unit_type
  result
end