Class: Braintree::PaginatedResult
- Inherits:
-
Object
- Object
- Braintree::PaginatedResult
- Includes:
- BaseModule
- Defined in:
- lib/braintree/paginated_result.rb
Instance Attribute Summary collapse
-
#current_page ⇒ Object
readonly
Returns the value of attribute current_page.
-
#page_size ⇒ Object
readonly
Returns the value of attribute page_size.
-
#total_items ⇒ Object
readonly
Returns the value of attribute total_items.
Instance Method Summary collapse
-
#initialize(total_items, page_size, current_page) ⇒ PaginatedResult
constructor
A new instance of PaginatedResult.
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(total_items, page_size, current_page) ⇒ PaginatedResult
Returns a new instance of PaginatedResult.
9 10 11 12 13 |
# File 'lib/braintree/paginated_result.rb', line 9 def initialize(total_items, page_size, current_page) @total_items = total_items @current_page = current_page @page_size = page_size end |
Instance Attribute Details
#current_page ⇒ Object (readonly)
Returns the value of attribute current_page.
5 6 7 |
# File 'lib/braintree/paginated_result.rb', line 5 def current_page @current_page end |
#page_size ⇒ Object (readonly)
Returns the value of attribute page_size.
6 7 8 |
# File 'lib/braintree/paginated_result.rb', line 6 def page_size @page_size end |
#total_items ⇒ Object (readonly)
Returns the value of attribute total_items.
7 8 9 |
# File 'lib/braintree/paginated_result.rb', line 7 def total_items @total_items end |