Class: SearchOptions
- Inherits:
-
Object
- Object
- SearchOptions
- Defined in:
- lib/search-options.rb
Instance Attribute Summary collapse
-
#date_range ⇒ Object
Returns the value of attribute date_range.
-
#literal ⇒ Object
Returns the value of attribute literal.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#safe ⇒ Object
Returns the value of attribute safe.
-
#sort_by ⇒ Object
Returns the value of attribute sort_by.
Instance Method Summary collapse
-
#initialize(literal = false, sort_by = 'd', date_range = 'w', safe = 'off', mode = 'nws') ⇒ SearchOptions
constructor
A new instance of SearchOptions.
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_range ⇒ Object
Returns the value of attribute date_range.
2 3 4 |
# File 'lib/search-options.rb', line 2 def date_range @date_range end |
#literal ⇒ Object
Returns the value of attribute literal.
2 3 4 |
# File 'lib/search-options.rb', line 2 def literal @literal end |
#mode ⇒ Object
Returns the value of attribute mode.
2 3 4 |
# File 'lib/search-options.rb', line 2 def mode @mode end |
#safe ⇒ Object
Returns the value of attribute safe.
2 3 4 |
# File 'lib/search-options.rb', line 2 def safe @safe end |
#sort_by ⇒ Object
Returns the value of attribute sort_by.
2 3 4 |
# File 'lib/search-options.rb', line 2 def sort_by @sort_by end |