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
53 54 55 |
# File 'lib/view_model/access_control/composed.rb', line 53 def checker @checker end |
#error_type ⇒ Object
Returns the value of attribute error_type
53 54 55 |
# File 'lib/view_model/access_control/composed.rb', line 53 def error_type @error_type end |
#location ⇒ Object
Returns the value of attribute location
53 54 55 |
# File 'lib/view_model/access_control/composed.rb', line 53 def location @location end |
#reason ⇒ Object
Returns the value of attribute reason
53 54 55 |
# File 'lib/view_model/access_control/composed.rb', line 53 def reason @reason end |
Instance Method Details
#check(env) ⇒ Object
58 59 60 |
# File 'lib/view_model/access_control/composed.rb', line 58 def check(env) env.instance_exec(&self.checker) end |
#name ⇒ Object
54 55 56 |
# File 'lib/view_model/access_control/composed.rb', line 54 def name "#{reason} (#{location})" end |