Sha256: 7ee11ffbd3ac704fe8c6fee4c97c1acb4b2bdb51ecb3a9d44ba73e7261088f8f

Contents?: true

Size: 583 Bytes

Versions: 9

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

require 'gir_ffi/builders/base_argument_builder'

module GirFFI
  module Builders
    # Convertor for arguments for property setters.
    class PropertyArgumentBuilder < BaseArgumentBuilder
      def pre_conversion
        pr = []
        pr << "#{call_argument_name} = #{ingoing_convertor.conversion}"
        pr
      end

      def ingoing_convertor
        if type_info.needs_ruby_to_c_conversion_for_properties?
          RubyToCConvertor.new(type_info, name)
        else
          NullConvertor.new(name)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.14.0 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.13.1 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.13.0 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.12.1 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.12.0 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.11.4 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.11.3 lib/gir_ffi/builders/property_argument_builder.rb
gir_ffi-0.11.2 lib/gir_ffi/builders/property_argument_builder.rb