Module: Sunspot::Query::Restriction
- Defined in:
- lib/sunspot/query/restriction.rb
Overview
:nodoc:
Defined Under Namespace
Classes: AllOf, AnyOf, Base, Between, EqualTo, GreaterThan, LessThan, SameAs
Class Method Summary collapse
- .[](restriction_name) ⇒ Object
-
.names ⇒ Object
Return the names of all of the restriction classes that should be made available to the DSL.
Class Method Details
.[](restriction_name) ⇒ Object
17 18 19 20 |
# File 'lib/sunspot/query/restriction.rb', line 17 def [](restriction_name) @types ||= {} @types[restriction_name.to_sym] ||= const_get(Sunspot::Util.camel_case(restriction_name.to_s)) end |
.names ⇒ Object
Return the names of all of the restriction classes that should be made available to the DSL.
Returns
- Array
-
Collection of restriction class names
13 14 15 |
# File 'lib/sunspot/query/restriction.rb', line 13 def names constants - %w(Base SameAs) #XXX this seems ugly end |