Sha256: ec48e3be4ad26cafe7b625339213aff0b535a3462db52e456ebf162b1a2cce19
Contents?: true
Size: 378 Bytes
Versions: 1
Compression:
Stored size: 378 Bytes
Contents
module Rack module Schmobile module Request def is_mobile? unless defined?(@is_mobile) @is_mobile = Rack::Schmobile::Filters.apply(self) end @is_mobile end def is_device?(identifier) user_agent =~ /#{identifier}/i end end end end Rack::Request.class_eval do include Rack::Schmobile::Request end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
schmobile-0.2.0 | lib/rack/schmobile/request_extension.rb |