Sha256: 299eb8eb87a0f66336bb52c32767dab1d360bd076436f5f0d2d9353f9ad8970b

Contents?: true

Size: 357 Bytes

Versions: 26

Compression:

Stored size: 357 Bytes

Contents

module CloudSesame
	module Query
		module DSL
			module SortMethods

				def sort(input = false)
					if input.is_a? Hash
						request.sort.sorting_attributes = input
						return self
					elsif input
						request.sort[input]
					elsif input.nil?
						return self
					else
						request.sort.sorting_attributes
					end
				end

			end
		end
	end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
CloudSesame-0.6.8 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.7 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.6 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.5 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.4 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.3 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.2 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.1 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.6.0 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.5 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.4 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.3 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.2 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.1 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.5.0 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.4.6 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.4.5 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.4.4 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.4.3 lib/cloud_sesame/query/dsl/sort_methods.rb
CloudSesame-0.4.2 lib/cloud_sesame/query/dsl/sort_methods.rb