Class: HomePage::PaginationMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/home_page/pagination_metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pageObject

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_pageObject

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_entriesObject 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