ProcessedSource contains objects which are generated by Parser and other information such as disabled lines for cops. It also provides a convenient way to access source lines.
# File lib/rubocop/processed_source.rb, line 10 def initialize(buffer, ast, comments, tokens, diagnostics) @buffer = buffer @ast = ast @comments = comments @tokens = tokens @diagnostics = diagnostics @comment_config = CommentConfig.new(self) end
# File lib/rubocop/processed_source.rb, line 41 def [](*args) lines[*args] end
# File lib/rubocop/processed_source.rb, line 19 def disabled_line_ranges comment_config.cop_disabled_line_ranges end
# File lib/rubocop/processed_source.rb, line 49 def file_path @buffer.name end
# File lib/rubocop/processed_source.rb, line 23 def lines if @lines @lines else init_lines @lines end end
Generated with the Darkfish Rdoc Generator 2.