Class: CanTango::Finder::Permit::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/cantango/permits_ext/finder/permit/account.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#account

Attributes inherited from Base

#name, #type

Instance Method Summary collapse

Methods inherited from Base

#account_finder

Methods inherited from Base

#permit

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, options = {}
  super
  @account = options[:account]
end

Instance Attribute Details

#user_accountObject (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
end

Instance Method Details

#account_registryObject



20
21
22
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 20

def 
  CanTango.config.permits.accounts.registry_for()
end

#find_permitObject



12
13
14
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 12

def find_permit
  retrieve_permit
end

#permitsObject



16
17
18
# File 'lib/cantango/permits_ext/finder/permit/account.rb', line 16

def permits
  .registered_for(type)
end