Class: Eaco::Cucumber::ActiveRecord::User::Designators::Authenticated
- Inherits:
-
Designator
- Object
- String
- Designator
- Eaco::Cucumber::ActiveRecord::User::Designators::Authenticated
- Defined in:
- lib/eaco/cucumber/active_record/user/designators/authenticated.rb
Overview
A Designator based on a the User class.
This is an example on how to grant rights to all instances of a given model.
The class name is available as the Designator#value.
The String representation for an example User is “authenticated:User”.
Instance Attribute Summary
Attributes inherited from Designator
Instance Method Summary collapse
-
#describe ⇒ String
This Designator description.
-
#klass ⇒ Class
private
Looks up this class by constantizing it.
-
#resolve ⇒ Array
Users matching this designator.
Methods inherited from Designator
#as_json, configure!, designator_name, harvest, id, #initialize, #inspect, label, #label, make, parse, resolve, search, #type
Constructor Details
This class inherits a constructor from Eaco::Designator
Instance Method Details
#describe ⇒ String
This Designator description.
26 27 28 |
# File 'lib/eaco/cucumber/active_record/user/designators/authenticated.rb', line 26 def describe(*) "Any authenticated user" end |
#klass ⇒ Class (private)
Looks up this class by constantizing it.
45 46 47 |
# File 'lib/eaco/cucumber/active_record/user/designators/authenticated.rb', line 45 def klass @_klass ||= self.value.constantize end |
#resolve ⇒ Array
Users matching this designator.
35 36 37 |
# File 'lib/eaco/cucumber/active_record/user/designators/authenticated.rb', line 35 def resolve klass.all end |