Class: Drillbit::Parameters::Index
- Inherits:
-
Object
- Object
- Drillbit::Parameters::Index
- Defined in:
- lib/drillbit/parameters/index.rb
Constant Summary collapse
- DEFAULT_QUERY =
'*'
Instance Attribute Summary collapse
-
#raw_parameters ⇒ Object
Returns the value of attribute raw_parameters.
Instance Method Summary collapse
-
#initialize(raw_parameters) ⇒ Index
constructor
A new instance of Index.
- #present? ⇒ Boolean
- #query ⇒ Object
Constructor Details
#initialize(raw_parameters) ⇒ Index
Returns a new instance of Index.
9 10 11 |
# File 'lib/drillbit/parameters/index.rb', line 9 def initialize(raw_parameters) self.raw_parameters = raw_parameters || {} end |
Instance Attribute Details
#raw_parameters ⇒ Object
Returns the value of attribute raw_parameters.
7 8 9 |
# File 'lib/drillbit/parameters/index.rb', line 7 def raw_parameters @raw_parameters end |
Instance Method Details
#present? ⇒ Boolean
13 14 15 |
# File 'lib/drillbit/parameters/index.rb', line 13 def present? query end |
#query ⇒ Object
17 18 19 |
# File 'lib/drillbit/parameters/index.rb', line 17 def query compacted_parameters['query'] || compacted_parameters['q'] end |