def build
      controller_name = @klass.name.gsub(/Controller$/, '').underscore
      Rails.application.routes.routes.each_with_object({}) do |route, comments|
        if route.defaults[:controller] == controller_name
          verb_match = route.verb.to_s.match(/\^(.*)\$/)
          verbs = verb_match.nil? ? '*' : verb_match[1]
          (comments[route.defaults[:action]] ||= []) << "#{verbs} #{route.ast}"
        end
      end
    end
def build
      controller_name = @klass.name.gsub(/Controller$/, '').underscore
      Rails.application.routes.routes.each_with_object({}) do |route, comments|
        if route.defaults[:controller] == controller_name
          verb_match = route.verb.to_s.match(/\^(.*)\$/)
          verbs = verb_match.nil? ? '*' : verb_match[1]
          (comments[route.defaults[:action]] ||= []) << "#{verbs} #{route.ast}"
        end
      end
    end
takes a controller
 builds the lines to be put into the file