Class: Stellar::TransactionPage

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/stellar/transaction_page.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ TransactionPage

Returns a new instance of TransactionPage.

Parameters:

  • resource (Hyperclient::Link)


6
7
8
# File 'lib/stellar/transaction_page.rb', line 6

def initialize(resource)
  @resource = resource
end

Instance Method Details

#eachObject



10
11
12
13
14
# File 'lib/stellar/transaction_page.rb', line 10

def each
  @resource.records.each do |tx|
    yield tx if block_given?
  end
end

#next_pageStellar::TransactionPage



17
18
19
# File 'lib/stellar/transaction_page.rb', line 17

def next_page
  self.class.new(@resource.next)
end

#next_page!Object



21
22
23
# File 'lib/stellar/transaction_page.rb', line 21

def next_page!
  @resource = @resource.next
end