Sha256: 7b442dc10927877266147fd09d5105056cc35188c7b0290321363a63437a7526
Contents?: true
Size: 458 Bytes
Versions: 9
Compression:
Stored size: 458 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