Class: CanTango::PermitEngine::Finder
- Inherits:
-
Object
- Object
- CanTango::PermitEngine::Finder
- Includes:
- Helpers::Debug
- Defined in:
- lib/cantango/permit_engine/finder.rb
Direct Known Subclasses
CanTango::Permits::AccountPermit::Finder, CanTango::Permits::RoleGroupPermit::Finder, CanTango::Permits::RolePermit::Finder, CanTango::Permits::UserPermit::Finder
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
This class is used to find the right permit, possible scoped for a specific user account.
-
#user_account ⇒ Object
readonly
This class is used to find the right permit, possible scoped for a specific user account.
Instance Method Summary collapse
- #get_permit ⇒ Object
-
#initialize(user_account, name) ⇒ Finder
constructor
A new instance of Finder.
Methods included from Helpers::Debug
Constructor Details
#initialize(user_account, name) ⇒ Finder
Returns a new instance of Finder.
9 10 11 12 |
# File 'lib/cantango/permit_engine/finder.rb', line 9 def initialize user_account, name @user_account = user_account @name = name.to_s.underscore.to_sym end |
Instance Attribute Details
#name ⇒ Object (readonly)
This class is used to find the right permit, possible scoped for a specific user account
7 8 9 |
# File 'lib/cantango/permit_engine/finder.rb', line 7 def name @name end |
#user_account ⇒ Object (readonly)
This class is used to find the right permit, possible scoped for a specific user account
7 8 9 |
# File 'lib/cantango/permit_engine/finder.rb', line 7 def user_account @user_account end |
Instance Method Details
#get_permit ⇒ Object
14 15 16 17 |
# File 'lib/cantango/permit_engine/finder.rb', line 14 def get_permit raise find_error if !retrieve_permit retrieve_permit end |