Class: IndeedAPI::Job
- Inherits:
-
Object
- Object
- IndeedAPI::Job
- Defined in:
- lib/indeed_api/job.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#expired ⇒ Object
readonly
Returns the value of attribute expired.
-
#formatted_location ⇒ Object
readonly
Returns the value of attribute formatted_location.
-
#formatted_location_full ⇒ Object
readonly
Returns the value of attribute formatted_location_full.
-
#formatted_relative_time ⇒ Object
readonly
Returns the value of attribute formatted_relative_time.
-
#job_key ⇒ Object
readonly
Returns the value of attribute job_key.
-
#job_title ⇒ Object
readonly
Returns the value of attribute job_title.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#onmousedown ⇒ Object
readonly
Returns the value of attribute onmousedown.
-
#snippet ⇒ Object
readonly
Returns the value of attribute snippet.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#sponsored ⇒ Object
readonly
Returns the value of attribute sponsored.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(data = {}) ⇒ Job
Returns a new instance of Job.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/indeed_api/job.rb', line 9 def initialize(data = {}) @job_title = data['jobtitle'] @company = data['company'] @city = data['city'] @state = data['state'] @country = data['country'] @formatted_location = data['formattedLocation'] @source = data['source'] @date = data['date'] ? Time.parse(data['date']) : nil @snippet = data['snippet'] @url = data['url'] @onmousedown = data['onmousedown'] @latitude = data['latitude'] ? data['latitude'].to_f : nil @longitude = data['longitude'] ? data['longitude'].to_f : nil @job_key = data['jobkey'] @sponsored = data['sponsored'] == 'true' @expired = data['expired'] == 'true' @formatted_location_full = data['formattedLocationFull'] @formatted_relative_time = data['formattedRelativeTime'] end |
Instance Attribute Details
#city ⇒ Object (readonly)
Returns the value of attribute city.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def city @city end |
#company ⇒ Object (readonly)
Returns the value of attribute company.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def company @company end |
#country ⇒ Object (readonly)
Returns the value of attribute country.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def country @country end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def date @date end |
#expired ⇒ Object (readonly)
Returns the value of attribute expired.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def expired @expired end |
#formatted_location ⇒ Object (readonly)
Returns the value of attribute formatted_location.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def formatted_location @formatted_location end |
#formatted_location_full ⇒ Object (readonly)
Returns the value of attribute formatted_location_full.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def formatted_location_full @formatted_location_full end |
#formatted_relative_time ⇒ Object (readonly)
Returns the value of attribute formatted_relative_time.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def formatted_relative_time @formatted_relative_time end |
#job_key ⇒ Object (readonly)
Returns the value of attribute job_key.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def job_key @job_key end |
#job_title ⇒ Object (readonly)
Returns the value of attribute job_title.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def job_title @job_title end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def longitude @longitude end |
#onmousedown ⇒ Object (readonly)
Returns the value of attribute onmousedown.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def onmousedown @onmousedown end |
#snippet ⇒ Object (readonly)
Returns the value of attribute snippet.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def snippet @snippet end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def source @source end |
#sponsored ⇒ Object (readonly)
Returns the value of attribute sponsored.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def sponsored @sponsored end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def state @state end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/indeed_api/job.rb', line 5 def url @url end |