Class: CanTango::PermitEngine::Finder

Inherits:
Object
  • Object
show all
Includes:
Helpers::Debug
Defined in:
lib/cantango/permit_engine/finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Debug

#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 , name
  @user_account = 
  @name = name.to_s.underscore.to_sym
end

Instance Attribute Details

#nameObject (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_accountObject (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
end

Instance Method Details

#get_permitObject



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