Sha256: fb5cceb388ef5d4c2e9251b5a5ed2718437123dd5cacf6123df36778ff5e3cb7
Contents?: true
Size: 457 Bytes
Versions: 9
Compression:
Stored size: 457 Bytes
Contents
# frozen_string_literal: true module GirFFI # Generates method stubs that will replace themselves with the real # method upon being called. class MethodStubber def initialize(method_info) @info = method_info end def method_stub <<-STUB.reset_indentation def #{@info.method? ? '' : 'self.'}#{@info.safe_name} *args, &block setup_and_call "#{@info.name}", args, &block end STUB end end end
Version data entries
9 entries across 9 versions & 1 rubygems