Class: RuboCop::Cop::Kata::EnvDiscipline
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Kata::EnvDiscipline
- Defined in:
- lib/rubocop/cop/kata/env_discipline.rb
Constant Summary collapse
- MSG =
"`ENV` belongs in the boot layer; pass configuration in."
Instance Method Summary collapse
Instance Method Details
#on_const(node) ⇒ Object
6 7 8 9 10 |
# File 'lib/rubocop/cop/kata/env_discipline.rb', line 6 def on_const(node) return unless node.short_name == :ENV return unless node.namespace.nil? || node.namespace.cbase_type? add_offense(node, message: MSG) end |