Sha256: 7ae038ff614e565f4b272e05dfb7d9c8c062325e09f06622ceec85c17e79d841

Contents?: true

Size: 705 Bytes

Versions: 9

Compression:

Stored size: 705 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi/builders/initializer_return_value_builder'
require 'gir_ffi/builders/base_method_builder'

module GirFFI
  module Builders
    # Implements the creation of a Ruby object initializer definition out of a
    # GIR IFunctionInfo.
    class InitializerBuilder < BaseMethodBuilder
      def initialize(info)
        super(info, InitializerReturnValueBuilder)
      end

      def singleton_method?
        false
      end

      def method_name
        @info.safe_name.sub(/^new/, 'initialize')
      end

      def result
        []
      end

      def function_call_arguments
        argument_builder_collection.call_argument_names
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.11.0 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.10.2 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.10.1 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.10.0 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.10.0.pre1 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.9.5 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.9.4 lib/gir_ffi/builders/initializer_builder.rb
gir_ffi-0.9.3 lib/gir_ffi/builders/initializer_builder.rb