class GirFFI::MethodStubber
Generates method stubs that will replace themselves with the real method upon being called.
Public Class Methods
new(method_info)
click to toggle source
# File lib/gir_ffi/method_stubber.rb, line 5 def initialize(method_info) @info = method_info end
Public Instance Methods
method_stub()
click to toggle source
# File lib/gir_ffi/method_stubber.rb, line 9 def method_stub " def #{@info.method? ? '' : 'self.'}#{@info.safe_name} *args, &block setup_and_call "#{@info.name}", args, &block end ".reset_indentation end