Class: Kenexa::Job
- Inherits:
-
Struct
- Object
- Struct
- Kenexa::Job
- Defined in:
- lib/kenexa/job.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#internal_id ⇒ Object
Returns the value of attribute internal_id.
-
#last_updated ⇒ Object
Returns the value of attribute last_updated.
-
#state ⇒ Object
Returns the value of attribute state.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(attributes = {}) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(attributes = {}) ⇒ Job
Returns a new instance of Job.
5 6 7 8 9 |
# File 'lib/kenexa/job.rb', line 5 def initialize(attributes = {}) attributes.each do |attribute, value| send("#{attribute}=", value) end end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def city @city end |
#internal_id ⇒ Object
Returns the value of attribute internal_id
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def internal_id @internal_id end |
#last_updated ⇒ Object
Returns the value of attribute last_updated
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def last_updated @last_updated end |
#state ⇒ Object
Returns the value of attribute state
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def state @state end |
#title ⇒ Object
Returns the value of attribute title
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def title @title end |
#url ⇒ Object
Returns the value of attribute url
3 4 5 |
# File 'lib/kenexa/job.rb', line 3 def url @url end |
Instance Method Details
#description ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kenexa/job.rb', line 11 def description @description ||= begin doc = Nokogiri::HTML(open(url)) parser = JobDetailParser.new details = parser.parse(doc) details['Job Description'] end end |