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.
10 11 12 |
# File 'lib/drillbit/parameters/index.rb', line 10 def initialize(raw_parameters) self.raw_parameters = raw_parameters || {} end |
Instance Attribute Details
#raw_parameters ⇒ Object
Returns the value of attribute raw_parameters.
8 9 10 |
# File 'lib/drillbit/parameters/index.rb', line 8 def raw_parameters @raw_parameters end |
Instance Method Details
#present? ⇒ Boolean
14 15 16 |
# File 'lib/drillbit/parameters/index.rb', line 14 def present? query end |
#query ⇒ Object
18 19 20 |
# File 'lib/drillbit/parameters/index.rb', line 18 def query compacted_parameters['query'] || compacted_parameters['q'] end |