Sha256: f7498541edd99777c05d6cdbd8bfc76716d0acc19929acc0c1af67a6e650e51c

Contents?: true

Size: 398 Bytes

Versions: 5

Compression:

Stored size: 398 Bytes

Contents

class GirFFI::Builders::RubyToCConvertor
  def initialize type_info, argument_name
    @type_info = type_info
    @argument_name = argument_name
  end

  def conversion
    args = conversion_arguments @argument_name
    "#{@type_info.argument_class_name}.from(#{args})"
  end

  def conversion_arguments name
    @type_info.extra_conversion_arguments.map(&:inspect).push(name).join(", ")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gir_ffi-0.7.4 lib/gir_ffi/builders/ruby_to_c_convertor.rb
gir_ffi-0.7.3 lib/gir_ffi/builders/ruby_to_c_convertor.rb
gir_ffi-0.7.2 lib/gir_ffi/builders/ruby_to_c_convertor.rb
gir_ffi-0.7.1 lib/gir_ffi/builders/ruby_to_c_convertor.rb
gir_ffi-0.7.0 lib/gir_ffi/builders/ruby_to_c_convertor.rb