Class: ViewModel::AccessControl::Composed::PermissionsCheck
- Inherits:
-
Struct
- Object
- Struct
- ViewModel::AccessControl::Composed::PermissionsCheck
- Defined in:
- lib/view_model/access_control/composed.rb
Instance Attribute Summary collapse
-
#checker ⇒ Object
Returns the value of attribute checker.
-
#error_type ⇒ Object
Returns the value of attribute error_type.
-
#location ⇒ Object
Returns the value of attribute location.
-
#reason ⇒ Object
Returns the value of attribute reason.
Instance Method Summary collapse
Instance Attribute Details
#checker ⇒ Object
Returns the value of attribute checker
69 70 71 |
# File 'lib/view_model/access_control/composed.rb', line 69 def checker @checker end |
#error_type ⇒ Object
Returns the value of attribute error_type
69 70 71 |
# File 'lib/view_model/access_control/composed.rb', line 69 def error_type @error_type end |
#location ⇒ Object
Returns the value of attribute location
69 70 71 |
# File 'lib/view_model/access_control/composed.rb', line 69 def location @location end |
#reason ⇒ Object
Returns the value of attribute reason
69 70 71 |
# File 'lib/view_model/access_control/composed.rb', line 69 def reason @reason end |
Instance Method Details
#check(env) ⇒ Object
74 75 76 |
# File 'lib/view_model/access_control/composed.rb', line 74 def check(env) env.instance_exec(&self.checker) end |
#name ⇒ Object
70 71 72 |
# File 'lib/view_model/access_control/composed.rb', line 70 def name "#{reason} (#{location})" end |