Class: Search::Query
- Inherits:
-
Object
- Object
- Search::Query
- Defined in:
- app/models/iron/search/query.rb
Instance Attribute Summary collapse
-
#terms ⇒ Object
readonly
Returns the value of attribute terms.
Instance Method Summary collapse
- #blank? ⇒ Boolean
-
#initialize(raw) ⇒ Query
constructor
A new instance of Query.
- #to_s ⇒ Object
Constructor Details
#initialize(raw) ⇒ Query
Returns a new instance of Query.
5 6 7 |
# File 'app/models/iron/search/query.rb', line 5 def initialize(raw) @terms = sanitize(raw) end |
Instance Attribute Details
#terms ⇒ Object (readonly)
Returns the value of attribute terms.
3 4 5 |
# File 'app/models/iron/search/query.rb', line 3 def terms @terms end |
Instance Method Details
#blank? ⇒ Boolean
9 |
# File 'app/models/iron/search/query.rb', line 9 def blank? = terms.blank? |
#to_s ⇒ Object
10 |
# File 'app/models/iron/search/query.rb', line 10 def to_s = terms.to_s |