123456789_123456789_123456789_123456789_123456789_

Class: RBS::UnitTest::Convertibles::BlankSlate

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: BasicObject
Defined in: lib/rbs/unit_test/convertibles.rb

Instance Method Summary

Instance Method Details

#__with_object_methods(*methods)

[ GitHub ]

  
# File 'lib/rbs/unit_test/convertibles.rb', line 12

def __with_object_methods(*methods)
  methods.each do |method|
    singleton_class = ::Object.instance_method(:singleton_class).bind_call(self) #: Class
    singleton_class.instance_eval do
      define_method method, ::Object.instance_method(method)
    end
  end
  self
end