Class: LinkedIn::Position::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/linked_in/position.rb

Instance Method Summary collapse

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

#companyObject



39
40
41
# File 'lib/linked_in/position.rb', line 39

def company
  @company ||= Company.new(@position.xpath('./company'))
end

#end_monthObject



31
32
33
# File 'lib/linked_in/position.rb', line 31

def end_month
  @position.xpath('./end-date/month').text.to_i
end

#end_yearObject



35
36
37
# File 'lib/linked_in/position.rb', line 35

def end_year
  @position.xpath('./end-date/year').text.to_i
end

#start_monthObject



23
24
25
# File 'lib/linked_in/position.rb', line 23

def start_month
  @position.xpath('./start-date/month').text.to_i
end

#start_yearObject



27
28
29
# File 'lib/linked_in/position.rb', line 27

def start_year
  @position.xpath('./start-date/year').text.to_i
end