Class: LanguageServer::Linter::RubyWC
- Inherits:
-
Object
- Object
- LanguageServer::Linter::RubyWC
- Defined in:
- lib/language_server/linter/ruby_wc.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(source) ⇒ RubyWC
constructor
A new instance of RubyWC.
Constructor Details
#initialize(source) ⇒ RubyWC
Returns a new instance of RubyWC.
25 26 27 |
# File 'lib/language_server/linter/ruby_wc.rb', line 25 def initialize(source) @source = source end |
Instance Method Details
#call ⇒ Object
29 30 31 32 33 |
# File 'lib/language_server/linter/ruby_wc.rb', line 29 def call .scan(/.+:(\d+):\s*(.+?)[,:]\s(.+)/).map do |line_num, type, | Error.new(line_num: line_num.to_i - 1, characters: (, line_num.to_i - 1), message: , type: type) end end |