Class: Rubydex::RuleConfig
- Inherits:
-
Object
- Object
- Rubydex::RuleConfig
- Defined in:
- lib/rubydex/config.rb,
ext/rubydex/config.c
Overview
The settings of a single linter rule, read from a [linter.rules.RuleName] table.
Instance Attribute Summary collapse
-
#exclude_patterns ⇒ Object
readonly
: Array.
-
#name ⇒ Object
readonly
: String.
-
#severity ⇒ Object
readonly
: singleton(Severity::Base)?.
Instance Method Summary collapse
-
#enabled? ⇒ Boolean
: () -> bool.
-
#initialize(name, enabled, exclude_patterns = [], severity = nil) ⇒ RuleConfig
constructor
: (String, bool, ?Array, ?singleton(Severity::Base)?) -> void.
Constructor Details
#initialize(name, enabled, exclude_patterns = [], severity = nil) ⇒ RuleConfig
: (String, bool, ?Array, ?singleton(Severity::Base)?) -> void
47 48 49 50 51 52 |
# File 'lib/rubydex/config.rb', line 47 def initialize(name, enabled, exclude_patterns = [], severity = nil) @name = name @enabled = enabled @exclude_patterns = exclude_patterns @severity = severity end |
Instance Attribute Details
#exclude_patterns ⇒ Object (readonly)
: Array
41 42 43 |
# File 'lib/rubydex/config.rb', line 41 def exclude_patterns @exclude_patterns end |
#name ⇒ Object (readonly)
: String
38 39 40 |
# File 'lib/rubydex/config.rb', line 38 def name @name end |
#severity ⇒ Object (readonly)
: singleton(Severity::Base)?
44 45 46 |
# File 'lib/rubydex/config.rb', line 44 def severity @severity end |
Instance Method Details
#enabled? ⇒ Boolean
: () -> bool
55 56 57 |
# File 'lib/rubydex/config.rb', line 55 def enabled? @enabled end |