core/refinement.rbs in rbs-3.5.3 vs core/refinement.rbs in rbs-3.6.0.dev.1

- old
+ new

@@ -2,10 +2,25 @@ # Refinement is a class of the `self` (current context) inside `refine` # statement. It allows to import methods from other modules, see # #import_methods. # class Refinement < Module + # <!-- + # rdoc-file=eval.c + # - target -> class_or_module + # --> + # Return the class or module refined by the receiver. + # + # module M + # refine String do + # end + # end + # + # M.refinements[0].target # => String + # + def target: () -> Module? + private # <!-- # rdoc-file=class.c # - import_methods(module, ...) -> self @@ -38,32 +53,7 @@ # import_methods Enumerable # # Can't import method which is not defined with Ruby code: Enumerable#drop # end # end # - def import_methods: (*Module) -> self - - # <!-- - # rdoc-file=eval.c - # - refined_class -> class - # --> - # Deprecated; prefer #target. - # - # Return the class refined by the receiver. - # - def refined_class: () -> Module - - # <!-- - # rdoc-file=eval.c - # - target -> class_or_module - # --> - # Return the class or module refined by the receiver. - # - # module M - # refine String do - # end - # end - # - # M.refinements[0].target # => String - # - def target: () -> Module + def import_methods: (Module module, *Module extra_modules) -> self end