Class: ActionDispatch::Routing::MobileMatcher
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::MobileMatcher
- Defined in:
- lib/rails_mobile/mobile_dispatch/mobile_matcher.rb
Instance Method Summary collapse
-
#initialize ⇒ MobileMatcher
constructor
A new instance of MobileMatcher.
- #matches?(request) ⇒ Boolean
Constructor Details
#initialize ⇒ MobileMatcher
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
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 |