Class: QueryBuilder

Inherits:
Struct show all
Defined in:
lib/search_tools.rb

Overview

A struct which represents a query to a search engine.

See Also:

Author:

  • Shreyan Jain

Instance Attribute Summary collapse

Instance Attribute Details

#count ⇒ Integer

Returns the number of results to return. Usually Ten Blue Ones ;).

Returns:

  • (Integer) —

    the number of results to return. Usually Ten Blue Ones ;)



22
# File 'lib/search_tools.rb', line 22

QueryBuilder = Struct.new(:query, :market, :safesearch, :offset, :count)

#market ⇒ String

Returns the market to search in, as defined by ISO 3166. See SearchEngines::ISO3166.

Returns:



22
# File 'lib/search_tools.rb', line 22

QueryBuilder = Struct.new(:query, :market, :safesearch, :offset, :count)

#offset ⇒ Integer

Returns the offset of the search results, you might think of this as the page number. Used for pagination.

Returns:

  • (Integer) —

    the offset of the search results, you might think of this as the page number. Used for pagination.



22
# File 'lib/search_tools.rb', line 22

QueryBuilder = Struct.new(:query, :market, :safesearch, :offset, :count)

#query ⇒ String

Returns the string being searched for.

Returns:

  • (String) —

    the string being searched for.



22
# File 'lib/search_tools.rb', line 22

QueryBuilder = Struct.new(:query, :market, :safesearch, :offset, :count)

#safesearch ⇒ Boolean

Returns whether to use safe search or not.

Returns:

  • (Boolean) —

    whether to use safe search or not.



22
# File 'lib/search_tools.rb', line 22

QueryBuilder = Struct.new(:query, :market, :safesearch, :offset, :count)