Class: RuboCop::Cop::Ruact::NoExtendSelf
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Ruact::NoExtendSelf
- Defined in:
- lib/rubocop/cop/ruact/no_extend_self.rb
Overview
Prohibits ‘extend self` and `module_function` in all files. Modules must use explicit class methods or classes with initialize (NFR13).
Constant Summary collapse
- MSG =
"extend self is prohibited (NFR13). Use explicit class methods or a class with initialize."
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
23 24 25 26 27 |
# File 'lib/rubocop/cop/ruact/no_extend_self.rb', line 23 def on_send(node) return unless extend_self?(node) || (node) add_offense(node) end |