module SnipSnap::PlatformDetectExtension

# SnipSnap::PlatformDetectExtension

Require Path: `snipsnap/extensions/platform_detect`

Public Class Methods

registered(app) click to toggle source
# File lib/snipsnap/extensions/platform_detect.rb, line 6
def self.registered(app)
  app.before do
    user_agent = request.env['HTTP_USER_AGENT'].to_s

    @is_android = user_agent =~ /Android/ || user_agent =~ /Linux/
  end
end