Class: PryRailsDiffRoutes::RemovedRoutesFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/pry_rails_diff_routes/formatters/removed_routes_formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(routes) ⇒ RemovedRoutesFormatter

Returns a new instance of RemovedRoutesFormatter.



3
4
5
# File 'lib/pry_rails_diff_routes/formatters/removed_routes_formatter.rb', line 3

def initialize(routes)
  @routes = routes
end

Instance Method Details

#to_sObject



7
8
9
10
11
12
# File 'lib/pry_rails_diff_routes/formatters/removed_routes_formatter.rb', line 7

def to_s
  <<~NEW
    #{Util.bold_red 'Removed:'}
    #{@routes.map(&:to_s).join("\n")}
  NEW
end