Sha256: 8b66f3e02ce43fa9f87076c8929770320f4840ed90202f4725dfde931c181ec9

Contents?: true

Size: 521 Bytes

Versions: 156

Compression:

Stored size: 521 Bytes

Contents

class FilteredList
  attr_reader :data, :facets, :paging

  def initialize(paginated_list)
    self.data   = paginated_list[:list]
    self.paging = paginated_list
  end

  def data=(data)
    @data = []
    @data = data if data.present?
  end

  def paging=(paginated_list)
    @paging = {
      total_items:  paginated_list[:list].total_count,
      current_page: paginated_list[:list].current_page,
      total_pages:  paginated_list[:list].total_pages,
      total_count:  paginated_list[:total_count]
    }
  end
end

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
cm-admin-4.4.8 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.4.6 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.4.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.4.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.3.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.2.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.2.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.1.2 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.1.1 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.1.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-4.0.0 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.16 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.15 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.14 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.13 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.12 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.11 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.10 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.9 lib/generators/cm_admin/templates/concerns/filtered_list.rb
cm-admin-3.0.8 lib/generators/cm_admin/templates/concerns/filtered_list.rb