Class: ActionController::AllowBrowser::BrowserBlocker
- Inherits:
-
Object
- Object
- ActionController::AllowBrowser::BrowserBlocker
- Defined in:
- lib/action_controller/metal/allow_browser.rb
Overview
:nodoc:
Constant Summary collapse
- SETS =
{ modern: { safari: 17.2, chrome: 120, firefox: 121, opera: 106, ie: false } }
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#versions ⇒ Object
readonly
Returns the value of attribute versions.
Instance Method Summary collapse
- #blocked? ⇒ Boolean
-
#initialize(request, versions:) ⇒ BrowserBlocker
constructor
A new instance of BrowserBlocker.
Constructor Details
#initialize(request, versions:) ⇒ BrowserBlocker
Returns a new instance of BrowserBlocker.
80 81 82 |
# File 'lib/action_controller/metal/allow_browser.rb', line 80 def initialize(request, versions:) @request, @versions = request, versions end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
78 79 80 |
# File 'lib/action_controller/metal/allow_browser.rb', line 78 def request @request end |
#versions ⇒ Object (readonly)
Returns the value of attribute versions.
78 79 80 |
# File 'lib/action_controller/metal/allow_browser.rb', line 78 def versions @versions end |
Instance Method Details
#blocked? ⇒ Boolean
84 85 86 |
# File 'lib/action_controller/metal/allow_browser.rb', line 84 def blocked? user_agent_version_reported? && unsupported_browser? end |