Class: Jpmobile::Rack::MobileCarrier

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

Instance Method Summary (collapse)

Constructor Details

- (MobileCarrier) initialize(app)

Returns a new instance of MobileCarrier



6
7
8
# File 'lib/jpmobile/rack/mobile_carrier.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

- (Object) call(env)



10
11
12
13
14
# File 'lib/jpmobile/rack/mobile_carrier.rb', line 10

def call(env)
  env['rack.jpmobile'] = Jpmobile::Mobile::AbstractMobile.carrier(env)

  @app.call(env)
end