Class: OSA::Paginated
- Inherits:
-
Object
- Object
- OSA::Paginated
- Defined in:
- lib/osa/util/paginated.rb
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(value, client) ⇒ Paginated
constructor
A new instance of Paginated.
- #next ⇒ Object
Constructor Details
#initialize(value, client) ⇒ Paginated
Returns a new instance of Paginated.
5 6 7 8 |
# File 'lib/osa/util/paginated.rb', line 5 def initialize(value, client) @value = value @client = client end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args) ⇒ Object (private)
27 28 29 |
# File 'lib/osa/util/paginated.rb', line 27 def method_missing(symbol, *args) @value.send(symbol, *args) end |
Instance Method Details
#all ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/osa/util/paginated.rb', line 16 def all value = @value['value'].dup next_page = self.next until next_page.nil? value += next_page['value'] next_page = next_page.next end value end |