Class: Rack::MMGeoip
- Inherits:
-
Object
- Object
- Rack::MMGeoip
- Defined in:
- lib/rack/mm_geoip.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ MMGeoip
constructor
A new instance of MMGeoip.
Constructor Details
#initialize(app) ⇒ MMGeoip
Returns a new instance of MMGeoip.
5 6 7 |
# File 'lib/rack/mm_geoip.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 |
# File 'lib/rack/mm_geoip.rb', line 9 def call(env) @app.call env.dup.merge('GEOIP' => ::MMGeoip.new(env)) end |