Module: Sunspot::Query::Restriction
- Defined in:
- lib/sunspot/query/restriction.rb
Overview
:nodoc:
Defined Under Namespace
Classes: AllOf, AnyOf, Base, Between, EqualTo, GreaterThan, LessThan, StartingWith
Class Method Summary collapse
-
.[](restriction_name) ⇒ Object
Convenience method to access a restriction class by an underscored symbol or string.
-
.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
Convenience method to access a restriction class by an underscored symbol or string
21 22 23 24 |
# File 'lib/sunspot/query/restriction.rb', line 21 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) #XXX this seems ugly end |