Class: Paquette::Routes::RouteBuilder
- Inherits:
-
Object
- Object
- Paquette::Routes::RouteBuilder
- Defined in:
- lib/paquette/routes.rb
Instance Method Summary collapse
- #delete(pattern, &block) ⇒ Object
- #get(pattern, &block) ⇒ Object
-
#initialize(routes) ⇒ RouteBuilder
constructor
A new instance of RouteBuilder.
- #patch(pattern, &block) ⇒ Object
- #post(pattern, &block) ⇒ Object
- #put(pattern, &block) ⇒ Object
Constructor Details
#initialize(routes) ⇒ RouteBuilder
Returns a new instance of RouteBuilder.
34 35 36 |
# File 'lib/paquette/routes.rb', line 34 def initialize(routes) @routes = routes end |
Instance Method Details
#delete(pattern, &block) ⇒ Object
50 51 52 |
# File 'lib/paquette/routes.rb', line 50 def delete(pattern, &block) @routes << Route.new("DELETE", pattern, block) end |
#get(pattern, &block) ⇒ Object
38 39 40 |
# File 'lib/paquette/routes.rb', line 38 def get(pattern, &block) @routes << Route.new("GET", pattern, block) end |
#patch(pattern, &block) ⇒ Object
54 55 56 |
# File 'lib/paquette/routes.rb', line 54 def patch(pattern, &block) @routes << Route.new("PATCH", pattern, block) end |