Class: Rubocop::Cop::Style::ClassAndModuleCamelCase
- Defined in:
- lib/rubocop/cop/style/class_and_module_camel_case.rb
Overview
This cops checks for class and module names with an underscore in them.
Constant Summary collapse
- MSG =
'Use CamelCase for classes and modules.'
Constants inherited from Cop
Instance Attribute Summary
Attributes inherited from Cop
#config, #corrections, #offences, #processed_source
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, all, #autocorrect?, #convention, #cop_config, cop_name, #cop_name, cop_type, #debug?, #ignore_node, inherited, #initialize, lint?, #message, non_rails, rails?, style?, #support_autocorrect?, #warning
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_class(node) ⇒ Object
11 12 13 |
# File 'lib/rubocop/cop/style/class_and_module_camel_case.rb', line 11 def on_class(node) check_name(node) end |
#on_module(node) ⇒ Object
15 16 17 |
# File 'lib/rubocop/cop/style/class_and_module_camel_case.rb', line 15 def on_module(node) check_name(node) end |