Class: Recurso::Queries::Single
- Inherits:
-
Struct
- Object
- Struct
- Recurso::Queries::Single
- Defined in:
- lib/recurso/queries/single.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
3 4 5 |
# File 'lib/recurso/queries/single.rb', line 3 def action @action end |
#identity ⇒ Object
Returns the value of attribute identity
3 4 5 |
# File 'lib/recurso/queries/single.rb', line 3 def identity @identity end |
#resource ⇒ Object
Returns the value of attribute resource
3 4 5 |
# File 'lib/recurso/queries/single.rb', line 3 def resource @resource end |
Instance Method Details
#permission? ⇒ Boolean
4 5 6 7 8 9 |
# File 'lib/recurso/queries/single.rb', line 4 def @permission ||= identity..exists?( resource: resource.relevant_resources, level: resource.relevant_levels_for(action) ) end |