Class: SupportSegment::MobileDetect::Constraint
- Inherits:
-
Object
- Object
- SupportSegment::MobileDetect::Constraint
- Defined in:
- lib/support_segment/mobile_detect.rb
Instance Method Summary collapse
Instance Method Details
#matches?(request) ⇒ Boolean
5 6 7 8 |
# File 'lib/support_segment/mobile_detect.rb', line 5 def matches?(request) return false if request.[:full_site_form_mobile] || request.host.match(/^m./) request.user_agent.to_s.match(/Mobile/) end |