Sha256: 32e5b028cac87a0487c2dff0640ab6c53beef2e358776cf75c98deea88122870

Contents?: true

Size: 534 Bytes

Versions: 11

Compression:

Stored size: 534 Bytes

Contents

module GirFFI
  module Builder
    # Creates property getter and setter code for a given IPropertyInfo.
    class Property
      def initialize property_info
        @info = property_info
      end

      def getter_def
        return <<-CODE
        def #{@info.getter_name}
          get_property "#{@info.name}"
        end
        CODE
      end

      def setter_def
        return <<-CODE
        def #{@info.getter_name}= value
          set_property "#{@info.name}", value
        end
        CODE
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gir_ffi-0.6.7 lib/gir_ffi/builders/property_builder.rb
gir_ffi-0.6.6 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.5 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.4 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.3 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.2 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.1 lib/gir_ffi/builder/property.rb
gir_ffi-0.6.0 lib/gir_ffi/builder/property.rb
gir_ffi-0.5.2 lib/gir_ffi/builder/property.rb
gir_ffi-0.5.1 lib/gir_ffi/builder/property.rb
gir_ffi-0.5.0 lib/gir_ffi/builder/property.rb