Class: LinkedIn::Position::Resource
- Inherits:
-
Object
- Object
- LinkedIn::Position::Resource
- Defined in:
- lib/linked_in/position.rb
Instance Method Summary collapse
- #company ⇒ Object
- #end_month ⇒ Object
- #end_year ⇒ Object
-
#initialize(position) ⇒ Resource
constructor
A new instance of Resource.
- #start_month ⇒ Object
- #start_year ⇒ Object
Constructor Details
#initialize(position) ⇒ Resource
Returns a new instance of Resource.
13 14 15 |
# File 'lib/linked_in/position.rb', line 13 def initialize(position) @position = position end |
Instance Method Details
#company ⇒ Object
39 40 41 |
# File 'lib/linked_in/position.rb', line 39 def company @company ||= Company.new(@position.xpath('./company')) end |
#end_month ⇒ Object
31 32 33 |
# File 'lib/linked_in/position.rb', line 31 def end_month @position.xpath('./end-date/month').text.to_i end |
#end_year ⇒ Object
35 36 37 |
# File 'lib/linked_in/position.rb', line 35 def end_year @position.xpath('./end-date/year').text.to_i end |
#start_month ⇒ Object
23 24 25 |
# File 'lib/linked_in/position.rb', line 23 def start_month @position.xpath('./start-date/month').text.to_i end |
#start_year ⇒ Object
27 28 29 |
# File 'lib/linked_in/position.rb', line 27 def start_year @position.xpath('./start-date/year').text.to_i end |