Class: Runner

Inherits:
Object
  • Object
show all
Includes:
ObjectSpace
Defined in:
lib/runner.rb

Class Method Summary collapse

Class Method Details

.reportObject



22
23
24
25
26
27
28
29
30
31
# File 'lib/runner.rb', line 22

def self.report
	puts
	puts "Total of lines analyzed: ".color(:yellow) + "#{@total_line}".color(:red)
	puts "Unconformities found: ".color(:yellow) + "#{@parser.reports.size}".color(:red)
	puts
	
	@parser.reports.each do |error|
		puts error
	end
end

.run(locate, rule) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/runner.rb', line 10

def self.run(locate, rule)
	@n_line = 0
	@total_line = 0
	@parser = Parser.new
	
	my_rule = file_to_rule(rule) 
	
	self.read(locate, my_rule)
	
	self.report
end