Skip to content

Files

Latest commit

 

History

History
33 lines (23 loc) · 577 Bytes

Lint-RefinementImportMethods.md

File metadata and controls

33 lines (23 loc) · 577 Bytes

Pattern: Use of include/prepend in refine block

Issue: -

Description

This rule checks if include or prepend is called in refine block. These methods are deprecated and should be replaced with Refinement#import_methods.

It emulates deprecation warnings in Ruby 3.1.

Examples

# bad
refine Foo do
  include Bar
end

# bad
refine Foo do
  prepend Bar
end

# good
refine Foo do
  import_methods Bar
end

Further Reading