Class: Apill::Parameters::Index
- Inherits:
-
Object
- Object
- Apill::Parameters::Index
- Defined in:
- lib/apill/parameters/index.rb
Constant Summary collapse
- DEFAULT_QUERY =
'*'.freeze
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.
8 9 10 |
# File 'lib/apill/parameters/index.rb', line 8 def initialize(raw_parameters) self.raw_parameters = raw_parameters || {} end |
Instance Attribute Details
#raw_parameters ⇒ Object
Returns the value of attribute raw_parameters.
6 7 8 |
# File 'lib/apill/parameters/index.rb', line 6 def raw_parameters @raw_parameters end |
Instance Method Details
#present? ⇒ Boolean
12 13 14 |
# File 'lib/apill/parameters/index.rb', line 12 def present? query end |
#query ⇒ Object
16 17 18 |
# File 'lib/apill/parameters/index.rb', line 16 def query compacted_parameters['query'] || compacted_parameters['q'] end |