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.



16
17
18
# File 'lib/linked_in/position.rb', line 16

def initialize(position)
  @position = position
end

Instance Method Details

#companyObject



42
43
44
# File 'lib/linked_in/position.rb', line 42

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

#end_monthObject



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

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

#end_yearObject



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

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

#start_monthObject



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

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

#start_yearObject



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

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