Add the gem as a dependency to your project's
gem "rubocop-commsworld", github: "commsworld/rubocop-commsworld", group: [:development, :test]
And install with
Configure rubocop in your project by creating a file in the root directory of the project,
require: - rubocop-commsworld - rubocop-rails - rubocop-rspec
Issues an offence when a class is defined within a module which does not have an adjacent privacy definition.
By default, configured to only run on
The motivation is to enforce the use of Private ActiveRecord models where appropriate.
# bad module Things class Thing < ApplicationRecord end end # good module Things class Thing < ApplicationRecord end private_constant :Thing # or public_constant end
The gem is available as open source under the terms of the [MIT License].