Class: ModuleMapper::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/module_mapper/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(paths_to_files) ⇒ Parser

Returns a new instance of Parser.



7
8
9
# File 'lib/module_mapper/parser.rb', line 7

def initialize(paths_to_files)
  @paths_to_files = paths_to_files
end

Instance Attribute Details

#paths_to_filesObject (readonly)

Returns the value of attribute paths_to_files.



5
6
7
# File 'lib/module_mapper/parser.rb', line 5

def paths_to_files
  @paths_to_files
end

Instance Method Details

#reportObject



11
12
13
14
15
16
17
# 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