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.'
Instance Attribute Summary
Attributes inherited from Cop
#autocorrect, #debug, #disabled_lines, #offences
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, #autocorrect_action, cop_name, cop_type, #do_autocorrect, #ignore_node, inherited, #initialize, #inspect, lint?, #name, rails?, style?
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_class(node) ⇒ Object
11 12 13 14 15 |
# File 'lib/rubocop/cop/style/class_and_module_camel_case.rb', line 11 def on_class(node) check_name(node) super end |
#on_module(node) ⇒ Object
17 18 19 20 21 |
# File 'lib/rubocop/cop/style/class_and_module_camel_case.rb', line 17 def on_module(node) check_name(node) super end |