Sha256: 36cf2bbaf41a89968903a1573e8c8834c6c2e9505df27d54e3f4a3faff2ad342

Contents?: true

Size: 375 Bytes

Versions: 3

Compression:

Stored size: 375 Bytes

Contents

# frozen_string_literal: true

module GirFFI
  module InfoExt
    # Extension module provinding a #safe_name method suitable for functions.
    module SafeFunctionName
      def safe_name
        name = self.name
        return '_' if name.empty?

        name
      end
    end
  end
end

GObjectIntrospection::IFunctionInfo.send :include, GirFFI::InfoExt::SafeFunctionName

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 lib/gir_ffi/info_ext/safe_function_name.rb
gir_ffi-0.14.0 lib/gir_ffi/info_ext/safe_function_name.rb
gir_ffi-0.13.1 lib/gir_ffi/info_ext/safe_function_name.rb