Class: Rack::MMGeoip

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/mm_geoip.rb

Instance Method Summary collapse

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