Class: TableSortable::Result
- Inherits:
-
Array
- Object
- Array
- TableSortable::Result
- Defined in:
- lib/table_sortable/result.rb
Instance Attribute Summary collapse
-
#total_count ⇒ Object
readonly
Returns the value of attribute total_count.
-
#unpaginated ⇒ Object
readonly
Returns the value of attribute unpaginated.
Instance Method Summary collapse
-
#initialize(the_array, page, page_size) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(the_array, page, page_size) ⇒ Result
Returns a new instance of Result.
6 7 8 9 10 |
# File 'lib/table_sortable/result.rb', line 6 def initialize(the_array, page, page_size) @unpaginated = the_array @total_count = the_array.length super(the_array[(page)*page_size, page_size]) end |
Instance Attribute Details
#total_count ⇒ Object (readonly)
Returns the value of attribute total_count.
4 5 6 |
# File 'lib/table_sortable/result.rb', line 4 def total_count @total_count end |
#unpaginated ⇒ Object (readonly)
Returns the value of attribute unpaginated.
4 5 6 |
# File 'lib/table_sortable/result.rb', line 4 def unpaginated @unpaginated end |