Class: QueryStringSearch::SearchOption
- Inherits:
-
Object
- Object
- QueryStringSearch::SearchOption
- Defined in:
- lib/query_string_search/search_option.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#desired_value ⇒ Object
readonly
Returns the value of attribute desired_value.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Instance Method Summary collapse
-
#initialize(raw_query) ⇒ SearchOption
constructor
A new instance of SearchOption.
Constructor Details
#initialize(raw_query) ⇒ SearchOption
Returns a new instance of SearchOption.
5 6 7 8 9 10 |
# File 'lib/query_string_search/search_option.rb', line 5 def initialize(raw_query) parsed_query = KeyValue.parse(raw_query) self.attribute = parsed_query.attribute self.desired_value = parsed_query.desired_value self.operator = parsed_query.operator end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
3 4 5 |
# File 'lib/query_string_search/search_option.rb', line 3 def attribute @attribute end |
#desired_value ⇒ Object
Returns the value of attribute desired_value.
3 4 5 |
# File 'lib/query_string_search/search_option.rb', line 3 def desired_value @desired_value end |
#operator ⇒ Object
Returns the value of attribute operator.
3 4 5 |
# File 'lib/query_string_search/search_option.rb', line 3 def operator @operator end |