Class: XpensifySDK::Invoices::Result
- Inherits:
-
Object
- Object
- XpensifySDK::Invoices::Result
- Includes:
- Enumerable
- Defined in:
- lib/xpensify_sdk/invoices/result.rb
Constant Summary collapse
- BATCH_SIZE =
40
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(options, api_key, client) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(options, api_key, client) ⇒ Result
Returns a new instance of Result.
10 11 12 13 14 15 |
# File 'lib/xpensify_sdk/invoices/result.rb', line 10 def initialize(, api_key, client) @options = @api_key = api_key @client = client reset_cursors! end |
Instance Method Details
#each ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/xpensify_sdk/invoices/result.rb', line 17 def each if block_given? while (element = read_from_page_or_fetch) yield element end reset_cursors! else to_enum(:each) end end |