Class: Tend::Collection
- Inherits:
-
Array
- Object
- Array
- Tend::Collection
- Defined in:
- lib/tend/models/collection.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#total_pages ⇒ Object
Returns the value of attribute total_pages.
Instance Method Summary collapse
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
3 4 5 |
# File 'lib/tend/models/collection.rb', line 3 def current_page @current_page end |
#limit ⇒ Object
Returns the value of attribute limit.
3 4 5 |
# File 'lib/tend/models/collection.rb', line 3 def limit @limit end |
#total_count ⇒ Object
Returns the value of attribute total_count.
3 4 5 |
# File 'lib/tend/models/collection.rb', line 3 def total_count @total_count end |
#total_pages ⇒ Object
Returns the value of attribute total_pages.
3 4 5 |
# File 'lib/tend/models/collection.rb', line 3 def total_pages @total_pages end |
Instance Method Details
#init(paginator = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/tend/models/collection.rb', line 5 def init paginator = {} return unless paginator paginator.each do |k,v| next unless respond_to? "#{k}=" send "#{k}=", v end end |