Class: Alula::Meta
- Inherits:
-
Object
- Object
- Alula::Meta
- Defined in:
- lib/alula/meta.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(meta) ⇒ Meta
constructor
A new instance of Meta.
Constructor Details
#initialize(meta) ⇒ Meta
Returns a new instance of Meta.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/alula/meta.rb', line 5 def initialize() return unless ['page'] @page = Alula::Pagination.new(['page']) # TODO: TJ Deprecate, the meta can hold a lot more than the page @total = @page.total @number = @page.number @size = @page.size end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/alula/meta.rb', line 3 def number @number end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
3 4 5 |
# File 'lib/alula/meta.rb', line 3 def page @page end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
3 4 5 |
# File 'lib/alula/meta.rb', line 3 def size @size end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
3 4 5 |
# File 'lib/alula/meta.rb', line 3 def total @total end |