Class: ActionDispatch::Routing::MobileMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_mobile/mobile_dispatch/mobile_matcher.rb

Instance Method Summary collapse

Constructor Details

#initializeMobileMatcher

Returns a new instance of MobileMatcher.



4
5
# File 'lib/rails_mobile/mobile_dispatch/mobile_matcher.rb', line 4

def initialize
end

Instance Method Details

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/rails_mobile/mobile_dispatch/mobile_matcher.rb', line 7

def matches?(request)
  !request.parameters.fetch(:mobile_device, nil).nil?
end