Class: LinkedIn::Patents::Resource

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

Instance Method Summary collapse

Constructor Details

#initialize(patent) ⇒ Resource

Returns a new instance of Resource.



13
14
15
# File 'lib/linked_in/patents.rb', line 13

def initialize(patent)
  @patent = patent
end

Instance Method Details

#dateObject



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

def date
  Date.civil(y=year,m=month,d=day)
end

#dayObject



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

def day
  @day ||= @patent.xpath("./date/day").text.to_i
end

#monthObject



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

def month
  @month ||= @patent.xpath("./date/month").text.to_i
end

#yearObject



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

def year
  @year ||= @patent.xpath("./date/year").text.to_i
end