Class: QuietQuality::Tools::Rubocop::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/quiet_quality/tools/rubocop/parser.rb

Direct Known Subclasses

Standardrb::Parser

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Parser

Returns a new instance of Parser.



5
6
7
# File 'lib/quiet_quality/tools/rubocop/parser.rb', line 5

def initialize(text)
  @text = text
end

Instance Method Details

#messagesObject



9
10
11
12
13
14
15
16
# File 'lib/quiet_quality/tools/rubocop/parser.rb', line 9

def messages
  return @_messages if defined?(@_messages)
  messages = content
    .fetch(:files)
    .map { |f| messages_for_file(f) }
    .flatten
  @_messages = Messages.new(messages)
end