Sha256: 96c5442d67f5799176c65b0eb68ecc3cf6974dd2b8502e41803c4ba25ebda2d4
Contents?: true
Size: 440 Bytes
Versions: 11
Compression:
Stored size: 440 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 def #{@info.method? ? '' : 'self.'}#{@info.safe_name} *args, &block setup_and_call "#{@info.name}", args, &block end STUB end end end
Version data entries
11 entries across 11 versions & 1 rubygems