Class: SearchOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/search-options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(literal = false, sort_by = 'd', date_range = 'w', safe = 'off', mode = 'nws') ⇒ SearchOptions

Returns a new instance of SearchOptions.



4
5
6
7
8
9
10
# File 'lib/search-options.rb', line 4

def initialize(literal = false, sort_by = 'd', date_range = 'w', safe = 'off', mode = 'nws')
  @literal = literal
  @sort_by = sort_by
  @date_range = date_range
  @safe = safe
  @mode = mode
end

Instance Attribute Details

#date_rangeObject

Returns the value of attribute date_range.



2
3
4
# File 'lib/search-options.rb', line 2

def date_range
  @date_range
end

#literalObject

Returns the value of attribute literal.



2
3
4
# File 'lib/search-options.rb', line 2

def literal
  @literal
end

#modeObject

Returns the value of attribute mode.



2
3
4
# File 'lib/search-options.rb', line 2

def mode
  @mode
end

#safeObject

Returns the value of attribute safe.



2
3
4
# File 'lib/search-options.rb', line 2

def safe
  @safe
end

#sort_byObject

Returns the value of attribute sort_by.



2
3
4
# File 'lib/search-options.rb', line 2

def sort_by
  @sort_by
end