Class: GirFFI::Builders::PropertyArgumentBuilder

Inherits:
BaseArgumentBuilder show all
Defined in:
lib/gir_ffi/builders/property_argument_builder.rb

Overview

Convertor for arguments for property setters.

Constant Summary

Constants inherited from BaseArgumentBuilder

BaseArgumentBuilder::KEYWORDS

Instance Attribute Summary

Attributes inherited from BaseArgumentBuilder

#arginfo, #array_arg, #length_arg, #related_callback_builder

Instance Method Summary collapse

Methods inherited from BaseArgumentBuilder

#argument_class_name, #array_length_idx, #array_length_parameter?, #call_argument_name, #closure_idx, #destroy_idx, #destroy_notifier?, #direction, #helper_argument?, #initialize, #mark_as_destroy_notifier, #mark_as_user_data, #name, #new_variable, #ownership_transfer, #safe, #specialized_type_tag, #type_info, #user_data?

Constructor Details

This class inherits a constructor from GirFFI::Builders::BaseArgumentBuilder

Instance Method Details

#ingoing_convertorObject



15
16
17
18
19
20
21
# File 'lib/gir_ffi/builders/property_argument_builder.rb', line 15

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

#pre_conversionObject



9
10
11
12
13
# File 'lib/gir_ffi/builders/property_argument_builder.rb', line 9

def pre_conversion
  pr = []
  pr << "#{call_argument_name} = #{ingoing_convertor.conversion}"
  pr
end