Class: Fulcrum::Page
- Inherits:
-
Object
- Object
- Fulcrum::Page
- Defined in:
- lib/fulcrum/page.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
Returns the value of attribute current_page.
-
#objects ⇒ Object
Returns the value of attribute objects.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#total_pages ⇒ Object
Returns the value of attribute total_pages.
Instance Method Summary collapse
-
#initialize(data, resources_name) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(data, resources_name) ⇒ Page
Returns a new instance of Page.
9 10 11 12 13 14 15 |
# File 'lib/fulcrum/page.rb', line 9 def initialize(data, resources_name) self.objects = data[resources_name] self.current_page = data['current_page'] self.total_pages = data['total_pages'] self.total_count = data['total_count'] self.per_page = data['per_page'] end |
Instance Attribute Details
#current_page ⇒ Object
Returns the value of attribute current_page.
4 5 6 |
# File 'lib/fulcrum/page.rb', line 4 def current_page @current_page end |
#objects ⇒ Object
Returns the value of attribute objects.
3 4 5 |
# File 'lib/fulcrum/page.rb', line 3 def objects @objects end |
#per_page ⇒ Object
Returns the value of attribute per_page.
7 8 9 |
# File 'lib/fulcrum/page.rb', line 7 def per_page @per_page end |
#total_count ⇒ Object
Returns the value of attribute total_count.
6 7 8 |
# File 'lib/fulcrum/page.rb', line 6 def total_count @total_count end |
#total_pages ⇒ Object
Returns the value of attribute total_pages.
5 6 7 |
# File 'lib/fulcrum/page.rb', line 5 def total_pages @total_pages end |