Class: LanguageServer::Linter::Error
- Inherits:
-
Object
- Object
- LanguageServer::Linter::Error
- Defined in:
- lib/language_server/linter/ruby_wc.rb
Instance Attribute Summary collapse
-
#characters ⇒ Object
readonly
Returns the value of attribute characters.
-
#line_num ⇒ Object
readonly
Returns the value of attribute line_num.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(line_num:, characters: 0..0, message:, type:) ⇒ Error
constructor
A new instance of Error.
- #warning? ⇒ Boolean
Constructor Details
#initialize(line_num:, characters: 0..0, message:, type:) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 |
# File 'lib/language_server/linter/ruby_wc.rb', line 8 def initialize(line_num:, characters: 0..0, message:, type:) @line_num = line_num @characters = characters @message = @type = type end |
Instance Attribute Details
#characters ⇒ Object (readonly)
Returns the value of attribute characters.
6 7 8 |
# File 'lib/language_server/linter/ruby_wc.rb', line 6 def characters @characters end |
#line_num ⇒ Object (readonly)
Returns the value of attribute line_num.
6 7 8 |
# File 'lib/language_server/linter/ruby_wc.rb', line 6 def line_num @line_num end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/language_server/linter/ruby_wc.rb', line 6 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/language_server/linter/ruby_wc.rb', line 6 def type @type end |
Instance Method Details
#==(other) ⇒ Object
19 20 21 |
# File 'lib/language_server/linter/ruby_wc.rb', line 19 def ==(other) line_num == other.line_num && characters == other.characters && == other. end |
#warning? ⇒ Boolean
15 16 17 |
# File 'lib/language_server/linter/ruby_wc.rb', line 15 def warning? @type == "warning" end |