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