Class: Nice::Recruitment::JobOffer
- Inherits:
-
Object
- Object
- Nice::Recruitment::JobOffer
- Defined in:
- lib/nice/recruitment/job_offer.rb
Overview
A job offer from recrutement.nicecotedazur.org.
Offers built from the listing page carry summary fields only (updated_at, recruitment_nature); offers built from a detail page carry the full set (contract, organization, description, ...). Fields absent from the source page are nil.
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#contract ⇒ Object
readonly
Returns the value of attribute contract.
-
#deadline ⇒ Object
readonly
Returns the value of attribute deadline.
-
#department ⇒ Object
readonly
Returns the value of attribute department.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#employment_framework ⇒ Object
readonly
Returns the value of attribute employment_framework.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#introduction ⇒ Object
readonly
Returns the value of attribute introduction.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#organization ⇒ Object
readonly
Returns the value of attribute organization.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#recruitment_nature ⇒ Object
readonly
Returns the value of attribute recruitment_nature.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#sector ⇒ Object
readonly
Returns the value of attribute sector.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#workplace ⇒ Object
readonly
Returns the value of attribute workplace.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ JobOffer
constructor
A new instance of JobOffer.
- #to_h ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ JobOffer
Returns a new instance of JobOffer.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/nice/recruitment/job_offer.rb', line 17 def initialize(attributes = {}) @id = attributes['id'] @title = attributes['title'] @url = attributes['url'] @reference = attributes['reference'] @category = attributes['category'] @deadline = parse_date(attributes['deadline']) @updated_at = parse_date(attributes['updated_at']) @recruitment_nature = attributes['recruitment_nature'] @contract = attributes['contract'] @organization = attributes['organization'] @department = attributes['department'] @location = attributes['location'] @workplace = attributes['workplace'] @sector = attributes['sector'] @domain = attributes['domain'] @employment_framework = attributes['employment_framework'] @introduction = attributes['introduction'] @description = attributes['description'] @profile = attributes['profile'] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def category @category end |
#contract ⇒ Object (readonly)
Returns the value of attribute contract.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def contract @contract end |
#deadline ⇒ Object (readonly)
Returns the value of attribute deadline.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def deadline @deadline end |
#department ⇒ Object (readonly)
Returns the value of attribute department.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def department @department end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def description @description end |
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def domain @domain end |
#employment_framework ⇒ Object (readonly)
Returns the value of attribute employment_framework.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def employment_framework @employment_framework end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def id @id end |
#introduction ⇒ Object (readonly)
Returns the value of attribute introduction.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def introduction @introduction end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def location @location end |
#organization ⇒ Object (readonly)
Returns the value of attribute organization.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def organization @organization end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def profile @profile end |
#recruitment_nature ⇒ Object (readonly)
Returns the value of attribute recruitment_nature.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def recruitment_nature @recruitment_nature end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def reference @reference end |
#sector ⇒ Object (readonly)
Returns the value of attribute sector.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def sector @sector end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def title @title end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def url @url end |
#workplace ⇒ Object (readonly)
Returns the value of attribute workplace.
12 13 14 |
# File 'lib/nice/recruitment/job_offer.rb', line 12 def workplace @workplace end |
Instance Method Details
#to_h ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/nice/recruitment/job_offer.rb', line 39 def to_h { 'id' => @id, 'title' => @title, 'url' => @url, 'reference' => @reference, 'category' => @category, 'deadline' => @deadline, 'updated_at' => @updated_at, 'recruitment_nature' => @recruitment_nature, 'contract' => @contract, 'organization' => @organization, 'department' => @department, 'location' => @location, 'workplace' => @workplace, 'sector' => @sector, 'domain' => @domain, 'employment_framework' => @employment_framework, 'introduction' => @introduction, 'description' => @description, 'profile' => @profile } end |