Module: Google::Search::Filter

Included in:
Video, Web
Defined in:
lib/google-search/search/mixins/filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#filterObject

Weither or not to filter duplicate results. Defaults to true.


10
11
12
# File 'lib/google-search/search/mixins/filter.rb', line 10

def filter
  @filter
end

Instance Method Details

#get_uri_paramsObject

:nodoc:


21
22
23
# File 'lib/google-search/search/mixins/filter.rb', line 21

def get_uri_params
  super + [[:filter, filter ? 1 : 0]]
end

#initialize(options = {}, &block) ⇒ Object

:nodoc:


14
15
16
17
# File 'lib/google-search/search/mixins/filter.rb', line 14

def initialize options = {}, &block
  @filter = options.delete(:filter) || 1
  super
end