class ModuleMapper::Parser

Attributes

paths_to_files[R]

Public Class Methods

new(paths_to_files) click to toggle source
# File lib/module_mapper/parser.rb, line 7
def initialize(paths_to_files)
  @paths_to_files = paths_to_files
end

Public Instance Methods

report() click to toggle source
# File lib/module_mapper/parser.rb, line 11
def report
  file_reader.source_files.each do |source_file|
    maps(source_file).each do |mmap|
      puts "#{mmap[:filename]}\t#{mmap[:module_name]}"
    end
  end
end

Private Instance Methods

file_reader() click to toggle source
# File lib/module_mapper/parser.rb, line 25
def file_reader
  @file_reader ||= ModuleMapper::FileReader.new(self.paths_to_files)
end
maps(source_file) click to toggle source
# File lib/module_mapper/parser.rb, line 21
def maps(source_file)
  ModuleMapper::Map.from(filename: source_file.filename, content: source_file.contents)
end