Class: CanTango::Finder::Permit::Base
- Includes:
- Helpers::Debug
- Defined in:
- lib/cantango/permits_ext/finder/permit/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
This class is used to find the right permit, possible scoped for a specific user account.
Attributes inherited from Base
Instance Method Summary collapse
- #account_finder(name) ⇒ Object
- #find_permit ⇒ Object
-
#initialize(name, options = {}) ⇒ Base
constructor
A new instance of Base.
Methods inherited from Base
Constructor Details
#initialize(name, options = {}) ⇒ Base
Returns a new instance of Base.
10 11 12 13 |
# File 'lib/cantango/permits_ext/finder/permit/base.rb', line 10 def initialize name, = {} super @account = [:account] end |
Instance Attribute Details
#account ⇒ Object (readonly)
This class is used to find the right permit, possible scoped for a specific user account
8 9 10 |
# File 'lib/cantango/permits_ext/finder/permit/base.rb', line 8 def account @account end |
Instance Method Details
#account_finder(name) ⇒ Object
20 21 22 |
# File 'lib/cantango/permits_ext/finder/permit/base.rb', line 20 def account_finder name @account_finder ||= CanTango::Finder::Permit::Account.new name, :type => type, :account => account end |
#find_permit ⇒ Object
15 16 17 18 |
# File 'lib/cantango/permits_ext/finder/permit/base.rb', line 15 def find_permit raise find_error if !retrieve_permit retrieve_permit end |