Class: CanTango::PermissionEngine::Selector::Base
- Inherits:
-
Object
- Object
- CanTango::PermissionEngine::Selector::Base
- Defined in:
- lib/cantango/permission_engine/selector/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Instance Method Summary collapse
-
#initialize(subject) ⇒ Base
constructor
A new instance of Base.
- #select(permissions) ⇒ Object
Constructor Details
#initialize(subject) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/cantango/permission_engine/selector/base.rb', line 7 def initialize subject @subject = subject end |
Instance Attribute Details
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
5 6 7 |
# File 'lib/cantango/permission_engine/selector/base.rb', line 5 def subject @subject end |
Instance Method Details
#select(permissions) ⇒ Object
11 12 13 |
# File 'lib/cantango/permission_engine/selector/base.rb', line 11 def select .select { || relevant? } end |