Class: RuboCop::Cop::Homebrew::InstallBundlerGems Private
- Defined in:
- rubocops/install_bundler_gems.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Enforces the use of Homebrew.install_bundler_gems!
in dev-cmd.
Constant Summary collapse
- MSG =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
"Only use `Homebrew.install_bundler_gems!` in dev-cmd."
- RESTRICT_ON_SEND =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
[:install_bundler_gems!].freeze
Instance Method Summary collapse
- #on_send(node) ⇒ Object private
Instance Method Details
#on_send(node) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
12 13 14 15 16 17 |
# File 'rubocops/install_bundler_gems.rb', line 12 def on_send(node) file_path = processed_source.file_path return if file_path.match?(%r{/(dev-cmd/.+|standalone/init|startup/bootsnap)\.rb\z}) add_offense(node) end |