class PryDiffRoutes::RouteWrapper
Public Instance Methods
<=>(other)
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 14 def <=>(other) self.prefix <=> other.prefix && self.verb <=> other.verb && self.reqs <=> other.reqs end
display_action()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 50 def display_action "#{arrow_key('Action')} ##{action}" end
display_constraints()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 54 def display_constraints "#{arrow_key('Constraints')} #{constraints}" end
display_controller()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 46 def display_controller "#{arrow_key('Controller')} #{controller.camelize}Controller" end
display_prefix()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 42 def display_prefix "#{arrow_key('Prefix')} #{prefix}" end
display_verb_and_path()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 38 def display_verb_and_path "#{bold verb.ljust(6, ' ')} #{dim_format path}" end
eql?(other)
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 24 def eql?(other) self == other end
hash()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 20 def hash [self.prefix, self.verb, self.reqs].hash end
to_s()
click to toggle source
# File lib/pry_diff_routes/route_wrapper.rb, line 28 def to_s pad_lines <<~ROUTE, 1 #{display_verb_and_path} #{display_prefix} #{display_controller} #{display_action} #{display_constraints} ROUTE end