Class: SCSSLint::AutoCorrect::Correctors::Base
- Inherits:
-
Object
- Object
- SCSSLint::AutoCorrect::Correctors::Base
show all
- Defined in:
- lib/scss_lint/auto_correct/correctors/base.rb
Direct Known Subclasses
ColorKeyword, EmptyLineBetweenBlocks, HexLength, HexNotation, Indentation, LeadingZero, PropertySortOrder, SingleLinePerSelector, SpaceBeforeBrace, StringQuotes, TrailingSemicolon, VariableName
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(config = {}) ⇒ Base
Returns a new instance of Base.
21
22
23
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 21
def initialize(config = {})
@config = config
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
19
20
21
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 19
def config
@config
end
|
Class Method Details
.linter_name ⇒ Object
3
4
5
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 3
def self.linter_name
self.name.split("::").last
end
|
.priority ⇒ Object
15
16
17
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 15
def self.priority
10
end
|
.short_name ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 7
def self.short_name
self.name.split("::").last.
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
gsub(/([a-z\d])([A-Z])/,'\1_\2').
tr('_', '-').
downcase
end
|
Instance Method Details
#enabled? ⇒ Boolean
25
26
27
|
# File 'lib/scss_lint/auto_correct/correctors/base.rb', line 25
def enabled?
@config["enabled"] != false
end
|