Sha256: f65dbe398867c8dd0f7d3a5d1eefe386a1fe5cbcdbb72d22fb26d31c6750c716
Contents?: true
Size: 568 Bytes
Versions: 7
Compression:
Stored size: 568 Bytes
Contents
class Browser module Consoles # Detect if browser is Xbox. def xbox? !!(ua =~ /xbox/i) end # Detect if browser is PlayStation. def playstation? !!(ua =~ /playstation/i) end # Detect if browser is Nintendo. def nintendo? !!(ua =~ /nintendo/i) end # Detect if browser is console (currently Xbox, PlayStation, or Nintendo). def console? xbox? || playstation? || nintendo? end # Detect if browser is running from PSP. def psp? !!(ua =~ /(PSP|Playstation Vita)/) end end end
Version data entries
7 entries across 7 versions & 1 rubygems