Sha256: dd94cce977ec2ff6b2b63b468ac006dfa0aa4036e64fd6919e3ddad69cb4d299

Contents?: true

Size: 337 Bytes

Versions: 32

Compression:

Stored size: 337 Bytes

Contents

# frozen_string_literal: true

module NfgUi
  module Components
    module Utilities
      # Add browser detection to the desired component
      module BrowserDetectable
        require 'browser'

        def browser
          Browser.new(user_agent: view_context.request.env['HTTP_USER_AGENT'])
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
nfg_ui-0.9.28 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.27 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.26 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.25.1 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.25 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.24.3 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.24.2 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.24.1 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.24 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.23 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.22 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.21 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.20 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.19.1 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.19 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.18.3 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.18.2 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.18.1 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.18 lib/nfg_ui/components/utilities/browser_detectable.rb
nfg_ui-0.9.17 lib/nfg_ui/components/utilities/browser_detectable.rb