Module: HiringThing

Defined in:
lib/hiringthing_api.rb,
lib/hiringthing_api/config.rb,
lib/hiringthing_api/resources/jobs.rb,
lib/hiringthing_api/resources/resource.rb,
lib/hiringthing_api/resources/applications.rb

Defined Under Namespace

Classes: Applications, Jobs, Resource

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject

Returns the value of attribute api_key.



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

def api_key
  @api_key
end

.api_passwordObject

Returns the value of attribute api_password.



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

def api_password
  @api_password
end

.dev_targetObject

Returns the value of attribute dev_target.



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

def dev_target
  @dev_target
end

.siteObject

Returns the value of attribute site.



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

def site
  @site
end

.subdomainObject

Returns the value of attribute subdomain.



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

def subdomain
  @subdomain
end

.timeoutObject

Returns the value of attribute timeout.



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

def timeout
  @timeout
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (HiringThing)

    the object that the method was called on



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/hiringthing_api/config.rb', line 5

def configure
  yield self

  Resource.user      = api_key
  Resource.password  = api_password
  Resource.timeout   = timeout unless (timeout.blank?)
  
  self.site ||= (dev_target || "https://#{subdomain}.hiringthing.com/remote/")
  
  Resource.site = site
end