Class: RBS::UnitTest::Convertibles::BlankSlate
- Inherits:
- BasicObject
- Defined in:
- lib/rbs/unit_test/convertibles.rb
Direct Known Subclasses
CustomRange, Each, ToA, ToArray, ToC, ToF, ToHash, ToI, ToIO, ToInt, ToPath, ToR, ToS, ToStr, ToSym
Instance Method Summary collapse
Instance Method Details
#__with_object_methods(*methods) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# 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 |