Class: Videojuicer::Resource::Collection
- Defined in:
- lib/videojuicer/resource/collection.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#total ⇒ Object
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(objects, total, offset, limit) ⇒ Collection
constructor
A new instance of Collection.
- #page_count ⇒ Object
- #page_number ⇒ Object
Constructor Details
#initialize(objects, total, offset, limit) ⇒ Collection
Returns a new instance of Collection.
16 17 18 19 20 21 22 |
# File 'lib/videojuicer/resource/collection.rb', line 16 def initialize(objects, total, offset, limit) clear objects.each {|o| self << o } self.total = total self.offset = offset self.limit = limit end |
Instance Attribute Details
#limit ⇒ Object
Returns the value of attribute limit.
12 13 14 |
# File 'lib/videojuicer/resource/collection.rb', line 12 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
13 14 15 |
# File 'lib/videojuicer/resource/collection.rb', line 13 def offset @offset end |
#total ⇒ Object
Returns the value of attribute total.
14 15 16 |
# File 'lib/videojuicer/resource/collection.rb', line 14 def total @total end |