Class: EpoOps::RegisterSearchResult

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/epo_ops/register_search_result.rb

Overview

A simple wrapper for register search query result.

Direct Known Subclasses

NullResult

Defined Under Namespace

Classes: NullResult

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countinteger (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.

Returns:

  • (integer)

    The number of applications matching the query.

See Also:



16
17
18
# File 'lib/epo_ops/register_search_result.rb', line 16

def count
  @count
end

#patentsArray (readonly)

Returns the patents returned by the search. Patentapplication data is not complete.

Returns:

  • (Array)

    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

#eachObject



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