Class: LinkedIn::Patents::Resource
- Inherits:
-
Object
- Object
- LinkedIn::Patents::Resource
- Defined in:
- lib/linked_in/patents.rb
Instance Method Summary collapse
- #date ⇒ Object
- #day ⇒ Object
-
#initialize(patent) ⇒ Resource
constructor
A new instance of Resource.
- #month ⇒ Object
- #year ⇒ Object
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
#date ⇒ Object
35 36 37 |
# File 'lib/linked_in/patents.rb', line 35 def date Date.civil(y=year,m=month,d=day) end |
#day ⇒ Object
27 28 29 |
# File 'lib/linked_in/patents.rb', line 27 def day @day ||= @patent.xpath("./date/day").text.to_i end |
#month ⇒ Object
31 32 33 |
# File 'lib/linked_in/patents.rb', line 31 def month @month ||= @patent.xpath("./date/month").text.to_i end |
#year ⇒ Object
23 24 25 |
# File 'lib/linked_in/patents.rb', line 23 def year @year ||= @patent.xpath("./date/year").text.to_i end |