Skip to content

Files

Latest commit

 

History

History
30 lines (21 loc) · 609 Bytes

Style-MissingRespondToMissing.md

File metadata and controls

30 lines (21 loc) · 609 Bytes

Pattern: Missing use of respond_to_missing?

Issue: -

Description

This rule checks for the presence of method_missing without also defining respond_to_missing?.

Examples

#bad
def method_missing(name, *args)
  # ...
end

#good
def respond_to_missing?(name, include_private)
  # ...
end

def method_missing(name, *args)
  # ...
end

Further Reading