Class: Google::Search::Patent
- Inherits:
-
Google::Search
- Object
- Google::Search
- Google::Search::Patent
- Includes:
- OrderBy
- Defined in:
- lib/google-search/search/patent.rb
Constant Summary
Constants included from OrderBy
Constants inherited from Google::Search
Instance Attribute Summary collapse
-
#issued_only ⇒ Object
When nil all parents are returned.
Attributes included from OrderBy
Attributes inherited from Google::Search
#api_key, #language, #offset, #options, #query, #sent, #size, #type, #version
Instance Method Summary collapse
-
#get_uri_params ⇒ Object
:nodoc:.
-
#initialize(options = {}, &block) ⇒ Patent
constructor
:nodoc:.
Methods inherited from Google::Search
#all_items, #each_item, #each_response, #get_hash, #get_raw, #get_response, #get_uri, json_decode, #next, size_for, url_encode, #validate
Constructor Details
#initialize(options = {}, &block) ⇒ Patent
:nodoc:
22 23 24 25 |
# File 'lib/google-search/search/patent.rb', line 22 def initialize = {}, &block @issued_only = .delete :issued_only super end |
Instance Attribute Details
#issued_only ⇒ Object
When nil all parents are returned. When true only issued will be returned, otherwise when false only filed but NOT issued patents will be returned.
18 19 20 |
# File 'lib/google-search/search/patent.rb', line 18 def issued_only @issued_only end |
Instance Method Details
#get_uri_params ⇒ Object
:nodoc:
29 30 31 32 33 34 |
# File 'lib/google-search/search/patent.rb', line 29 def get_uri_params super + [ [:as_psrg, issued_only ? 1 : nil], [:as_psra, issued_only === false ? 1 : nil] ] end |