Method: Contentstack::Query#limit

Defined in:
lib/contentstack/query.rb

#limit(count = 10) ⇒ Contentstack::Query

A limit on the number of objects to return.

Example

@query = @stack.content_type('category').query
@query.limit(50)

Parameters:

  • count (Number) (defaults to: 10)

    of objects to limit in resulset.

Returns:



312
313
314
315
# File 'lib/contentstack/query.rb', line 312

def limit(count=10)
  @query[:limit] = count
  self
end