Class: HomePage::PaginationMetadata
- Inherits:
-
Object
- Object
- HomePage::PaginationMetadata
- Defined in:
- lib/home_page/pagination_metadata.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#total_entries ⇒ Object
(also: #total_pages)
Returns the value of attribute total_entries.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ PaginationMetadata
constructor
A new instance of PaginationMetadata.
Constructor Details
#initialize(attributes) ⇒ PaginationMetadata
Returns a new instance of PaginationMetadata.
6 7 8 |
# File 'lib/home_page/pagination_metadata.rb', line 6 def initialize(attributes) attributes.each{|k,v| self.send("#{k}=", v) if self.respond_to?("#{k}=") } end |
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
3 4 5 |
# File 'lib/home_page/pagination_metadata.rb', line 3 def current_page @current_page end |
#per_page ⇒ Object
Returns the value of attribute per_page.
3 4 5 |
# File 'lib/home_page/pagination_metadata.rb', line 3 def per_page @per_page end |
#total_entries ⇒ Object Also known as: total_pages
Returns the value of attribute total_entries.
3 4 5 |
# File 'lib/home_page/pagination_metadata.rb', line 3 def total_entries @total_entries end |