Class: PryRailsDiffRoutes::ModifiedRoutesFormatter

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/pry_rails_diff_routes/formatters/modified_routes_formatter.rb

Instance Method Summary collapse

Methods included from Util

arrow_key, bold, bold_green, bold_red, bold_yellow, dim_format, highlight_green, highlight_red, pad_lines

Constructor Details

#initialize(routes_changes) ⇒ ModifiedRoutesFormatter

Returns a new instance of ModifiedRoutesFormatter.



5
6
7
# File 'lib/pry_rails_diff_routes/formatters/modified_routes_formatter.rb', line 5

def initialize(routes_changes)
  @routes_changes = routes_changes
end

Instance Method Details

#to_sObject



9
10
11
12
13
14
# File 'lib/pry_rails_diff_routes/formatters/modified_routes_formatter.rb', line 9

def to_s
  <<~MODIFIED
    #{bold_yellow 'Modified:'}
    #{routes_diff}
  MODIFIED
end