Class: Cb::Models::JobResults

Inherits:
Object
  • Object
show all
Defined in:
lib/cb/models/implementations/job_results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args_hash, job_hashes) ⇒ JobResults

Returns a new instance of JobResults.



15
16
17
18
19
20
21
22
23
24
# File 'lib/cb/models/implementations/job_results.rb', line 15

def initialize(args_hash, job_hashes)
  @args_hash = args_hash
  @jobs = extract_jobs(job_hashes)
  @total_count = args_hash['TotalCount']
  @last_item_index = args_hash['LastItemIndex']
  @city = args_hash['City']
  @state_code = args_hash['StateCode']
  @postal_code = args_hash['PostalCode']
  @search_location = args_hash['SearchMetaData']['SearchLocations']['SearchLocation'] rescue nil
end

Instance Attribute Details

#args_hashObject (readonly)

Returns the value of attribute args_hash.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def args_hash
  @args_hash
end

#cityObject (readonly)

Returns the value of attribute city.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def city
  @city
end

#jobsObject (readonly)

Returns the value of attribute jobs.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def jobs
  @jobs
end

#last_item_indexObject (readonly)

Returns the value of attribute last_item_index.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def last_item_index
  @last_item_index
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def postal_code
  @postal_code
end

#search_locationObject (readonly)

Returns the value of attribute search_location.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def search_location
  @search_location
end

#state_codeObject (readonly)

Returns the value of attribute state_code.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def state_code
  @state_code
end

#total_countObject (readonly)

Returns the value of attribute total_count.



14
15
16
# File 'lib/cb/models/implementations/job_results.rb', line 14

def total_count
  @total_count
end