Sha256: 7041b27656d52b61dd8a1b1d9dfcd9f62203e919bf5579e3ff8c37174d94de66

Contents?: true

Size: 275 Bytes

Versions: 22

Compression:

Stored size: 275 Bytes

Contents

module TableSortable
  class Result < Array

    attr_reader :total_count, :unpaginated

    def initialize(the_array, page, page_size)
      @unpaginated = the_array
      @total_count = the_array.length
      super(the_array[(page)*page_size, page_size])
    end

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
table_sortable-1.0.0.pre.alpha.21 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.20 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.19 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.18 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.17 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.16 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.15 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.14 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.13 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.12 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.11 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.10 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.9 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.8 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.7 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.6 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.5 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.4 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.3 lib/table_sortable/result.rb
table_sortable-1.0.0.pre.alpha.2 lib/table_sortable/result.rb