Class: EpoOps::RegisterSearchResult
- Inherits:
-
Object
- Object
- EpoOps::RegisterSearchResult
- Includes:
- Enumerable
- Defined in:
- lib/epo_ops/register_search_result.rb
Overview
A simple wrapper for register search query result.
Direct Known Subclasses
Defined Under Namespace
Classes: NullResult
Instance Attribute Summary collapse
-
#count ⇒ integer
readonly
The number of patents that match the query string.
-
#patents ⇒ Array
readonly
The patents returned by the search.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(patents, count, raw_data = nil) ⇒ RegisterSearchResult
constructor
A new instance of RegisterSearchResult.
Constructor Details
#initialize(patents, count, raw_data = nil) ⇒ RegisterSearchResult
Returns a new instance of RegisterSearchResult.
6 7 8 9 10 |
# File 'lib/epo_ops/register_search_result.rb', line 6 def initialize(patents,count,raw_data = nil) @patents = patents @count = count @raw_data = raw_data end |
Instance Attribute Details
#count ⇒ integer (readonly)
The number of patents that match the query string. Offsets and API query limits do not apply so that the actual number of patents returned can be much smaller.
16 17 18 |
# File 'lib/epo_ops/register_search_result.rb', line 16 def count @count end |
#patents ⇒ Array (readonly)
Returns the patents returned by the search. Patentapplication data is not complete.
19 20 21 |
# File 'lib/epo_ops/register_search_result.rb', line 19 def patents @patents end |
Instance Method Details
#each ⇒ Object
21 22 23 24 25 |
# File 'lib/epo_ops/register_search_result.rb', line 21 def each patents.each do |patent| yield(patent) end end |