class DatastaxRails::Collection

Holds a collection of DatastaxRails::Base objects.

Attributes

current_page[RW]

@!attribute [r] total_entries

@return [Fixnum] the total number of entries that match the search

@!attribute [r] per_page

@return [Fixnum] the per page value of the search that produced these results (used by will_paginate)

@!attribute [r] current_page

@return [Fixnum] the current page of the search that produced these results (used by will_paginate)

@!attribute [r] facets

@return [Hash] the facet results (field and/or range)
facets[RW]

@!attribute [r] total_entries

@return [Fixnum] the total number of entries that match the search

@!attribute [r] per_page

@return [Fixnum] the per page value of the search that produced these results (used by will_paginate)

@!attribute [r] current_page

@return [Fixnum] the current page of the search that produced these results (used by will_paginate)

@!attribute [r] facets

@return [Hash] the facet results (field and/or range)
highlights[RW]

@!attribute [r] total_entries

@return [Fixnum] the total number of entries that match the search

@!attribute [r] per_page

@return [Fixnum] the per page value of the search that produced these results (used by will_paginate)

@!attribute [r] current_page

@return [Fixnum] the current page of the search that produced these results (used by will_paginate)

@!attribute [r] facets

@return [Hash] the facet results (field and/or range)
per_page[RW]

@!attribute [r] total_entries

@return [Fixnum] the total number of entries that match the search

@!attribute [r] per_page

@return [Fixnum] the per page value of the search that produced these results (used by will_paginate)

@!attribute [r] current_page

@return [Fixnum] the current page of the search that produced these results (used by will_paginate)

@!attribute [r] facets

@return [Hash] the facet results (field and/or range)
total_entries[RW]

@!attribute [r] total_entries

@return [Fixnum] the total number of entries that match the search

@!attribute [r] per_page

@return [Fixnum] the per page value of the search that produced these results (used by will_paginate)

@!attribute [r] current_page

@return [Fixnum] the current page of the search that produced these results (used by will_paginate)

@!attribute [r] facets

@return [Hash] the facet results (field and/or range)

Public Instance Methods

inspect() click to toggle source
# File lib/datastax_rails/collection.rb, line 14
def inspect
  "<DatastaxRails::Collection##{object_id} contents: #{super}>"
end
total_pages() click to toggle source
# File lib/datastax_rails/collection.rb, line 18
def total_pages
  return 1 unless per_page
  (total_entries / per_page.to_f).ceil
end