Class: RuboCop::Cop::Force
Relationships & Source Files | |
Namespace Children | |
Exceptions:
| |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | lib/rubocop/cop/force.rb |
Overview
A scaffold for concrete forces.
Class Method Summary
- .all
- .force_name
- .inherited(subclass)
- .new(cops) ⇒ Force constructor
Instance Attribute Summary
- #cops readonly
Instance Method Summary
Constructor Details
.new(cops) ⇒ Force
Class Method Details
.all
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 19
def self.all @all ||= [] end
.force_name
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 28
def self.force_name name.split('::').last end
.inherited(subclass)
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 23
def self.inherited(subclass) super all << subclass end
Instance Attribute Details
#cops (readonly)
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 17
attr_reader :cops
Instance Method Details
#investigate(_processed_source)
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 50
def investigate(_processed_source) # Do custom processing and invoke #run_hook at arbitrary timing. end
#name
[ GitHub ]# File 'lib/rubocop/cop/force.rb', line 36
def name self.class.force_name end