Class: Routing::Middleware Abstract
- Inherits:
-
Object
- Object
- Routing::Middleware
- Defined in:
- lib/routing/middleware.rb
Overview
This class is abstract.
An abstract middleware class to illustrate how you can build your own.
Instance Method Summary collapse
-
#calculate(geo_points) {|Array<GeoPoint>| ... } ⇒ Array<GeoPoint>
The only method your own middleware has to implement to work.
Instance Method Details
#calculate(geo_points) {|Array<GeoPoint>| ... } ⇒ Array<GeoPoint>
The only method your own middleware has to implement to work.
21 22 23 24 25 |
# File 'lib/routing/middleware.rb', line 21 def calculate(geo_points) # manipulate geo points before routing here yield(geo_points) # hand control to the next middleware in the stack # manipulate geo points after routing here end |