Class: Browsable::PolicyScanner::Policy
- Inherits:
-
Data
- Object
- Data
- Browsable::PolicyScanner::Policy
- Defined in:
- lib/browsable/policy_scanner.rb
Overview
One discovered allow_browser callsite.
scope — the controller/concern it lives in (e.g. "Api::PostsController")
file — path relative to the project root
result — a PolicyDetector::Result (the resolved versions, or a note)
only — action-name strings the policy is limited to, or nil
except — action-name strings the policy excludes, or nil
concern — true when the callsite is in app/controllers/concerns
Instance Attribute Summary collapse
-
#concern ⇒ Object
readonly
Returns the value of attribute concern.
-
#except ⇒ Object
readonly
Returns the value of attribute except.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#only ⇒ Object
readonly
Returns the value of attribute only.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
Instance Attribute Details
#concern ⇒ Object (readonly)
Returns the value of attribute concern
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def concern @concern end |
#except ⇒ Object (readonly)
Returns the value of attribute except
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def except @except end |
#file ⇒ Object (readonly)
Returns the value of attribute file
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def file @file end |
#only ⇒ Object (readonly)
Returns the value of attribute only
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def only @only end |
#result ⇒ Object (readonly)
Returns the value of attribute result
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def result @result end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope
21 22 23 |
# File 'lib/browsable/policy_scanner.rb', line 21 def scope @scope end |
Instance Method Details
#application_controller? ⇒ Boolean
22 |
# File 'lib/browsable/policy_scanner.rb', line 22 def application_controller? = scope == "ApplicationController" |
#scoped? ⇒ Boolean
23 |
# File 'lib/browsable/policy_scanner.rb', line 23 def scoped? = !only.nil? || !except.nil? |