Ruby Conventions
Ruby Conventions bundles the generic Ruby naming idioms and applies them to every method in the project.
preset :ruby_conventions
preset is an alias for architecture, and reads better for a convention pack. Either works.
This checks:
- no
get_orset_accessor prefixes, across all public methods - no
is_predicate prefix (Ruby predicates end in?)
has_ is left alone, because Rails uses has_many and has_one, and has_access? style predicates are legitimate.
It adds no components, so it composes with any other architecture:
architecture :rails
architecture :ruby_conventions
The checks are name-based and exact, reported at high confidence.
Project-specific conventions stay opt-in through the naming rules, which is where the with_x / without_x pairing, the supports_*? ban, and cross-component correspondences live:
chat.methods.matching(/\Awith_(?<base>.+)/).requires("without_%{base}")