Class: Google::Search::Item::Patent

Inherits:
Google::Search::Item show all
Defined in:
lib/google-search/item/patent.rb

Instance Attribute Summary collapse

Attributes inherited from Google::Search::Item

#content, #index, #thumbnail_height, #thumbnail_uri, #thumbnail_width, #title, #uri, #visible_uri

Instance Method Summary collapse

Methods inherited from Google::Search::Item

class_for

Constructor Details

#initialize(hash) ⇒ Patent

Initialize with hash.



30
31
32
33
34
35
36
# File 'lib/google-search/item/patent.rb', line 30

def initialize hash
  super
  @id = hash['patentNumber'].to_i
  @application_date = DateTime.parse hash['applicationDate']
  @assignee = hash['assignee']
  @status = hash['patentStatus']
end

Instance Attribute Details

#application_dateObject (readonly)

Application DateTime.



25
26
27
# File 'lib/google-search/item/patent.rb', line 25

def application_date
  @application_date
end

#assigneeObject (readonly)

Assignee.



20
21
22
# File 'lib/google-search/item/patent.rb', line 20

def assignee
  @assignee
end

#idObject (readonly)

Patent id.



10
11
12
# File 'lib/google-search/item/patent.rb', line 10

def id
  @id
end

#statusObject (readonly)

Patent status.



15
16
17
# File 'lib/google-search/item/patent.rb', line 15

def status
  @status
end