Class: SearchFilter
- Inherits:
-
Object
- Object
- SearchFilter
- Defined in:
- lib/tiny_core/search_filter.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
Returns the value of attribute query.
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #id ⇒ Object
-
#initialize(attributes = {}) ⇒ SearchFilter
constructor
A new instance of SearchFilter.
Constructor Details
#initialize(attributes = {}) ⇒ SearchFilter
Returns a new instance of SearchFilter.
4 5 6 7 8 |
# File 'lib/tiny_core/search_filter.rb', line 4 def initialize(attributes = {}) return if attributes.nil? @query = attributes[:query] end |
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
2 3 4 |
# File 'lib/tiny_core/search_filter.rb', line 2 def query @query end |
Instance Method Details
#empty? ⇒ Boolean
10 11 12 |
# File 'lib/tiny_core/search_filter.rb', line 10 def empty? query.blank? end |
#id ⇒ Object
14 15 16 |
# File 'lib/tiny_core/search_filter.rb', line 14 def id 1 end |