# class Camping::CommandsHelpers::Route

### Public Instance Methods

app_header() click to toggle source

    # File lib/camping/commands.rb, line 69
    def app_header
      "#{app.to_s}"
    end

controller_header() click to toggle source

    # File lib/camping/commands.rb, line 73
    def controller_header
      "#{pad}#{app.to_s}::#{controller.to_s}"
    end

padded_message(with_method = false) click to toggle source

pad the controller name to be the right length, if we can.

    # File lib/camping/commands.rb, line 65
    def padded_message(with_method = false)
      "#{pad}#{(with_method ? http_method.to_s.upcase.ljust(pad.length, " ") : pad)}#{replace_reg url}"
    end

to_s() click to toggle source

    # File lib/camping/commands.rb, line 60
    def to_s
      "#{controller}: #{http_method}: #{url} - #{replace_reg url}"
    end

### Protected Instance Methods

http_methods() click to toggle source

    # File lib/camping/commands.rb, line 79
    def http_methods
      ["get", "post", "put", "patch", "delete"]
    end

pad() click to toggle source

    # File lib/camping/commands.rb, line 89
    def pad
      "         "
    end

replace_reg(pattern = "") click to toggle source

    # File lib/camping/commands.rb, line 83
    def replace_reg(pattern = "")
      xstr = "([^/]+)"; nstr = "(\d+)"
      pattern = pattern.gsub(xstr, ":string").gsub("(\\d+)", ":integer") unless pattern == "/"
      pattern
    end