Class: RouteDog::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/route_dog/report.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



7
8
9
# File 'lib/route_dog/report.rb', line 7

def initialize
  @defined_routes = Rails.application.routes.routes
end

Class Method Details

.generateObject



19
20
21
# File 'lib/route_dog/report.rb', line 19

def self.generate
  self.new.generate
end

Instance Method Details

#generateObject



11
12
13
14
15
16
17
# File 'lib/route_dog/report.rb', line 11

def generate
  remove_not_user_routes!
  map_routes_as_structs!
  calculate_totals
  save_report(template.result(binding))
  open_report_in_browser
end