rspec/rspec-core — pull request #528 by AlexKVal (2011-12-06 22:03:18+00:00)
Title: readability refactoring of #filter_applies?

Not sure about methods naming.
If those 'metadata' params (like in: filter_applies?(key, value, metadata=self) or configure_for_example(description, user_metadata) and others) would be Metadata, then code would be like:
metadata.filter_for_locations?(value)
metadata[key].filter_applies?(k, v)
user_metadata.configure_for_example(description)
and so on. Much concise and OOP.

Question:
It would be nice if filtering methods
"any_apply? all_apply? filter_applies?"
and private "relevant_line_numbers" and others
move into dedicated module ? (MetadataFiltering may be)
The Metadata class would be cleaner and the filtering logic would be isolated.

and: filter_applies? - it seems it has to be private, but it's not big deal :)