module Pepito::Handler::HTTPRouter

Routes for the http api

Public Instance Methods

http_route(method, path, cb) click to toggle source

Add an http route to the http_routes array. @param method [String] HTTP method for this route. Example: “GET”. @param path [String] Path for the http api. Example: “/info”. @param cb [Symbol] Callback function. @return [void]

# File lib/pepito/handler/http_router.rb, line 14
def http_route(method, path, cb)
  http_routes << HTTPApi::HTTPRoute.new(
    @robot,
    self,
    method,
    path,
    cb)
end
http_routes() click to toggle source

List of http routes. @return [Array<Pepito::HTTPApi::HTTPRoute>]

# File lib/pepito/handler/http_router.rb, line 25
def http_routes
  @http_routes ||= []
end