Class: Google::Search::Item::Patent
- Inherits:
-
Google::Search::Item
- Object
- Google::Search::Item
- Google::Search::Item::Patent
- Defined in:
- lib/google-search/item/patent.rb
Instance Attribute Summary collapse
-
#application_date ⇒ Object
readonly
Application DateTime.
-
#assignee ⇒ Object
readonly
Assignee.
-
#id ⇒ Object
readonly
Patent id.
-
#status ⇒ Object
readonly
Patent status.
Attributes inherited from Google::Search::Item
#content, #index, #thumbnail_height, #thumbnail_uri, #thumbnail_width, #title, #uri, #visible_uri
Instance Method Summary collapse
-
#initialize(hash) ⇒ Patent
constructor
Initialize with hash.
Methods inherited from Google::Search::Item
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_date ⇒ Object (readonly)
Application DateTime.
25 26 27 |
# File 'lib/google-search/item/patent.rb', line 25 def application_date @application_date end |
#assignee ⇒ Object (readonly)
Assignee.
20 21 22 |
# File 'lib/google-search/item/patent.rb', line 20 def assignee @assignee end |
#id ⇒ Object (readonly)
Patent id.
10 11 12 |
# File 'lib/google-search/item/patent.rb', line 10 def id @id end |
#status ⇒ Object (readonly)
Patent status.
15 16 17 |
# File 'lib/google-search/item/patent.rb', line 15 def status @status end |