Class: MongoRequestLogger::SearchTerms
- Inherits:
-
Object
- Object
- MongoRequestLogger::SearchTerms
- Defined in:
- lib/mongo_request_logger/search_terms.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
readonly
Returns the value of attribute parts.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#search ⇒ Object
readonly
Returns the value of attribute search.
-
#search_regex ⇒ Object
readonly
Returns the value of attribute search_regex.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(query) ⇒ SearchTerms
constructor
- query
- this is what you want tokenized split
-
if you’d like to split values on “,” then pass true.
Constructor Details
#initialize(query) ⇒ SearchTerms
- query
-
this is what you want tokenized
- split
-
if you’d like to split values on “,” then pass true
11 12 13 14 15 16 17 |
# File 'lib/mongo_request_logger/search_terms.rb', line 11 def initialize(query) @query = query @parts = {} @search = nil @search_regex = nil parse_query end |
Instance Attribute Details
#parts ⇒ Object (readonly)
Returns the value of attribute parts.
7 8 9 |
# File 'lib/mongo_request_logger/search_terms.rb', line 7 def parts @parts end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/mongo_request_logger/search_terms.rb', line 7 def path @path end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
7 8 9 |
# File 'lib/mongo_request_logger/search_terms.rb', line 7 def query @query end |
#search ⇒ Object (readonly)
Returns the value of attribute search.
7 8 9 |
# File 'lib/mongo_request_logger/search_terms.rb', line 7 def search @search end |
#search_regex ⇒ Object (readonly)
Returns the value of attribute search_regex.
7 8 9 |
# File 'lib/mongo_request_logger/search_terms.rb', line 7 def search_regex @search_regex end |
Instance Method Details
#[](key) ⇒ Object
19 20 21 |
# File 'lib/mongo_request_logger/search_terms.rb', line 19 def [](key) @parts[key] end |