Method: RuboCop::ProcessedSource.from_file

Defined in:
lib/rubocop/processed_source.rb

.from_file(path) ⇒ Object



15
16
17
18
19
20
# File 'lib/rubocop/processed_source.rb', line 15

def self.from_file(path)
  file = File.read(path)
  new(file, path)
rescue
  abort("#{Rainbow('rubocop: No such file or directory').red} -- #{path}")
end