Method: Sunspot::Query::Sort::RandomSort#initialize
- Defined in:
- lib/sunspot/query/sort.rb
#initialize(options_or_direction = nil) ⇒ RandomSort
79 80 81 82 83 84 85 86 87 |
# File 'lib/sunspot/query/sort.rb', line 79 def initialize(=nil) if .is_a?(Hash) @seed, @direction = [:seed], [:direction] else @direction = end @direction = (@direction || :asc).to_sym end |