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.
16 17 18 |
# File 'lib/linked_in/position.rb', line 16 def initialize(position) @position = position end |
Instance Method Details
#company ⇒ Object
42 43 44 |
# File 'lib/linked_in/position.rb', line 42 def company @company ||= Company.new(@position.xpath('./company')) end |
#end_month ⇒ Object
34 35 36 |
# File 'lib/linked_in/position.rb', line 34 def end_month @position.xpath('./end-date/month').text.to_i end |
#end_year ⇒ Object
38 39 40 |
# File 'lib/linked_in/position.rb', line 38 def end_year @position.xpath('./end-date/year').text.to_i end |
#start_month ⇒ Object
26 27 28 |
# File 'lib/linked_in/position.rb', line 26 def start_month @position.xpath('./start-date/month').text.to_i end |
#start_year ⇒ Object
30 31 32 |
# File 'lib/linked_in/position.rb', line 30 def start_year @position.xpath('./start-date/year').text.to_i end |