Class: Cb::Models::CollapsedJobResults

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args_hash) ⇒ CollapsedJobResults



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 5

def initialize(args_hash)
  @args_hash = args_hash
  @last_item_index = args_hash['LastItemIndex']
  @search_location = args_hash['SearchMetaData']['SearchLocations']['SearchLocation'] rescue nil
  @grouping_parameter = args_hash['GroupedJobSearchResults']['GroupingParameter']
  @grouped_jobs = extract_collapsed_jobs(args_hash['GroupedJobSearchResults']['SearchResults']['JobSearchResultsGroup'])
  @total_pages = args_hash['TotalPages']
  @total_count = args_hash['TotalCount']
  @first_item_index = args_hash['FirstItemIndex']
  @last_item_index = args_hash['LastItemIndex']
end

Instance Attribute Details

#args_hashObject (readonly)

Returns the value of attribute args_hash.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def args_hash
  @args_hash
end

#first_item_indexObject (readonly)

Returns the value of attribute first_item_index.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def first_item_index
  @first_item_index
end

#grouped_jobsObject (readonly)

Returns the value of attribute grouped_jobs.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def grouped_jobs
  @grouped_jobs
end

#grouping_parameterObject (readonly)

Returns the value of attribute grouping_parameter.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def grouping_parameter
  @grouping_parameter
end

#last_item_indexObject (readonly)

Returns the value of attribute last_item_index.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def last_item_index
  @last_item_index
end

#search_locationObject (readonly)

Returns the value of attribute search_location.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def search_location
  @search_location
end

#total_countObject (readonly)

Returns the value of attribute total_count.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def total_count
  @total_count
end

#total_pagesObject (readonly)

Returns the value of attribute total_pages.



4
5
6
# File 'lib/cb/models/implementations/collapsed_job_results.rb', line 4

def total_pages
  @total_pages
end