Class: LanguageServer::Linter::Error
- Inherits:
-
Object
- Object
- LanguageServer::Linter::Error
- Defined in:
- lib/language_server/linter/ruby_wc.rb
Instance Attribute Summary collapse
-
#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:, message:, type:) ⇒ Error
constructor
A new instance of Error.
- #warning? ⇒ Boolean
Constructor Details
#initialize(line_num:, message:, type:) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 |
# File 'lib/language_server/linter/ruby_wc.rb', line 8 def initialize(line_num:, message:, type:) @line_num = line_num = @type = type end |
Instance Attribute Details
#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 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
18 19 20 |
# File 'lib/language_server/linter/ruby_wc.rb', line 18 def ==(other) line_num == other.line_num && == other. end |
#warning? ⇒ Boolean
14 15 16 |
# File 'lib/language_server/linter/ruby_wc.rb', line 14 def warning? @type == "warning" end |