Class: CanTango::Finder::Permit::Account
- Defined in:
- lib/cantango/permits_ext/finder/permit/account.rb
Instance Attribute Summary collapse
-
#user_account ⇒ Object
readonly
Returns the value of attribute user_account.
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
- #account_registry ⇒ Object
- #find_permit ⇒ Object
-
#initialize(name, options = {}) ⇒ Account
constructor
A new instance of Account.
- #permits ⇒ Object
Methods inherited from Base
Methods inherited from Base
Constructor Details
#initialize(name, options = {}) ⇒ Account
Returns a new instance of Account.
7 8 9 10 |
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 7 def initialize name, = {} super @account = [:account] end |
Instance Attribute Details
#user_account ⇒ Object (readonly)
Returns the value of attribute user_account.
5 6 7 |
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 5 def user_account @user_account end |
Instance Method Details
#account_registry ⇒ Object
20 21 22 |
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 20 def account_registry CanTango.config.permits.accounts.registry_for(account) end |
#find_permit ⇒ Object
12 13 14 |
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 12 def find_permit retrieve_permit end |
#permits ⇒ Object
16 17 18 |
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 16 def permits account_registry.registered_for(type) end |