Class: Cb::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize ⇒ Config

Returns a new instance of Config.



13
14
15
16
# File 'lib/cb/config.rb', line 13

def initialize
  Cb::Utils::Country.inject_convenience_methods
  set_defaults
end

Instance Attribute Details

#debug_api ⇒ Object

Returns the value of attribute debug_api.



3
4
5
# File 'lib/cb/config.rb', line 3

def debug_api
  @debug_api
end

#dev_key ⇒ Object

Returns the value of attribute dev_key.



3
4
5
# File 'lib/cb/config.rb', line 3

def dev_key
  @dev_key
end

#host_site ⇒ Object

Returns the value of attribute host_site.



3
4
5
# File 'lib/cb/config.rb', line 3

def host_site
  @host_site
end

#time_out ⇒ Object

Returns the value of attribute time_out.



3
4
5
# File 'lib/cb/config.rb', line 3

def time_out
  @time_out
end

#uri_application ⇒ Object

Returns the value of attribute uri_application.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application
  @uri_application
end

#uri_application_registered ⇒ Object

Returns the value of attribute uri_application_registered.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_registered
  @uri_application_registered
end

#uri_application_submit ⇒ Object

Returns the value of attribute uri_application_submit.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_application_submit
  @uri_application_submit
end

#uri_company_find ⇒ Object

Returns the value of attribute uri_company_find.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_company_find
  @uri_company_find
end

#uri_education_code ⇒ Object

Returns the value of attribute uri_education_code.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_education_code
  @uri_education_code
end

#uri_employee_types ⇒ Object

Returns the value of attribute uri_employee_types.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_employee_types
  @uri_employee_types
end

#uri_job_category_search ⇒ Object

Returns the value of attribute uri_job_category_search.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_category_search
  @uri_job_category_search
end

#uri_job_find ⇒ Object

Returns the value of attribute uri_job_find.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_find
  @uri_job_find
end

#uri_job_search ⇒ Object

Returns the value of attribute uri_job_search.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_job_search
  @uri_job_search
end

#uri_recommendation_for_company ⇒ Object

Returns the value of attribute uri_recommendation_for_company.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_company
  @uri_recommendation_for_company
end

#uri_recommendation_for_job ⇒ Object

Returns the value of attribute uri_recommendation_for_job.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_job
  @uri_recommendation_for_job
end

#uri_recommendation_for_user ⇒ Object

Returns the value of attribute uri_recommendation_for_user.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_recommendation_for_user
  @uri_recommendation_for_user
end

#uri_user_change_password ⇒ Object

Returns the value of attribute uri_user_change_password.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_change_password
  @uri_user_change_password
end

#uri_user_delete ⇒ Object

Returns the value of attribute uri_user_delete.



3
4
5
# File 'lib/cb/config.rb', line 3

def uri_user_delete
  @uri_user_delete
end

#use_json ⇒ Object

Returns the value of attribute use_json.



3
4
5
# File 'lib/cb/config.rb', line 3

def use_json
  @use_json
end

Instance Method Details

#set_default_api_uris ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/cb/config.rb', line 18

def set_default_api_uris
  @uri_job_category_search            ||= '/v1/categories'
  @uri_employee_types                 ||= '/v1/employeetypes'
  @uri_company_find                   ||= '/Employer/CompanyDetails'
  @uri_job_search                     ||= '/v1/JobSearch'
  @uri_job_find                       ||= '/v1/Job'
  @uri_education_code                 ||= '/v1/EducationCodes'
  @uri_recommendation_for_job         ||= '/v1/Recommendations/ForJob'
  @uri_recommendation_for_user        ||= '/v1/Recommendations/ForUser'
  @uri_recommendation_for_company     ||= '/Employer/JobRecommendation'
  @uri_application                    ||= '/v1/application/blank'
  @uri_application_submit             ||= '/v1/Application/submit'
  @uri_application_registered         ||= '/v3/Application/registered'
  @uri_user_change_password           ||= '/v2/User/ChangePW'
  @uri_user_delete                    ||= '/v2/User/delete'
end

#to_hash ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/cb/config.rb', line 35

def to_hash
  {
    :uri_job_category_search          => @uri_job_category_search,
    :uri_employee_types               => @uri_employee_types,
    :dev_key                          => @dev_key,
    :host_site                        => @host_site,
    :time_out  	                      => @time_out,
    :use_json                         => @use_json,
    :uri_job_search                   => @uri_job_search,
    :uri_job_find                     => @uri_job_find,
    :uri_company_find                 => @uri_company_find,
    :uri_education_code               => @uri_education_code,
    :uri_recommendation_for_job       => @uri_recommendation_for_job,
    :uri_recommendation_for_user      => @uri_recommendation_for_user,
    :uri_recommendation_for_company   => @uri_recommendation_for_company,
    :uri_application                  => @uri_application,
    :uri_application_submit           => @uri_application_submit,
    :uri_application_registered       => @uri_application_registered,
    :uri_user_change_password         => @uri_user_change_password
  }
end