123456789_123456789_123456789_123456789_123456789_

Module: RBS::UnitTest::Spy

Relationships & Source Files
Namespace Children
Classes:
Defined in: lib/rbs/unit_test/spy.rb

Class Method Summary

Class Method Details

.wrap(object, method_name)

[ GitHub ]

  
# File 'lib/rbs/unit_test/spy.rb', line 6

def self.wrap(object, method_name)
  spy = WrapSpy.new(object: object, method_name: method_name)

  if block_given?
    begin
      yield spy, spy.wrapped_object
    end
  else
    spy
  end
end