Class: ActionController::AllowBrowser::BrowserBlocker
- Inherits:
-
Object
- Object
- ActionController::AllowBrowser::BrowserBlocker
- Defined in:
- lib/action_controller/metal/allow_browser.rb
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.
70 71 72 |
# File 'lib/action_controller/metal/allow_browser.rb', line 70 def initialize(request, versions:) @request, @versions = request, versions end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
68 69 70 |
# File 'lib/action_controller/metal/allow_browser.rb', line 68 def request @request end |
#versions ⇒ Object (readonly)
Returns the value of attribute versions.
68 69 70 |
# File 'lib/action_controller/metal/allow_browser.rb', line 68 def versions @versions end |
Instance Method Details
#blocked? ⇒ Boolean
74 75 76 |
# File 'lib/action_controller/metal/allow_browser.rb', line 74 def blocked? user_agent_version_reported? && unsupported_browser? end |