module Coverfield::Source::FileMethods

Mixin for shared methods between TestFile and File

Attributes

file_name[R]

Public Instance Methods

relative_file_name() click to toggle source

Returns the file name relative to the app root

# File lib/coverfield/source/file_methods.rb, line 12
       def relative_file_name
  @file_name.gsub(@config.app_root + '/', '')
end

Private Instance Methods

parse_code() click to toggle source

Parse the source code

# File lib/coverfield/source/file_methods.rb, line 6
        def parse_code
  @processed_source = RuboCop::ProcessedSource.from_file(@file_name, 2.3)
end