Class: Cb::Models::JobResults
- Inherits:
-
Object
- Object
- Cb::Models::JobResults
- Defined in:
- lib/cb/models/implementations/job_results.rb
Instance Attribute Summary collapse
-
#args_hash ⇒ Object
readonly
Returns the value of attribute args_hash.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#jobs ⇒ Object
readonly
Returns the value of attribute jobs.
-
#last_item_index ⇒ Object
readonly
Returns the value of attribute last_item_index.
-
#postal_code ⇒ Object
readonly
Returns the value of attribute postal_code.
-
#search_location ⇒ Object
readonly
Returns the value of attribute search_location.
-
#state_code ⇒ Object
readonly
Returns the value of attribute state_code.
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
Instance Method Summary collapse
-
#initialize(args_hash, job_hashes) ⇒ JobResults
constructor
A new instance of JobResults.
Constructor Details
#initialize(args_hash, job_hashes) ⇒ JobResults
Returns a new instance of JobResults.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/cb/models/implementations/job_results.rb', line 5 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_hash ⇒ Object (readonly)
Returns the value of attribute args_hash.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def args_hash @args_hash end |
#city ⇒ Object (readonly)
Returns the value of attribute city.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def city @city end |
#jobs ⇒ Object (readonly)
Returns the value of attribute jobs.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def jobs @jobs end |
#last_item_index ⇒ Object (readonly)
Returns the value of attribute last_item_index.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def last_item_index @last_item_index end |
#postal_code ⇒ Object (readonly)
Returns the value of attribute postal_code.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def postal_code @postal_code end |
#search_location ⇒ Object (readonly)
Returns the value of attribute search_location.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def search_location @search_location end |
#state_code ⇒ Object (readonly)
Returns the value of attribute state_code.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def state_code @state_code end |
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
4 5 6 |
# File 'lib/cb/models/implementations/job_results.rb', line 4 def total_count @total_count end |