class HubLink::Stream

Attributes

repo[RW]
since[RW]

Public Class Methods

new(repo, since: nil) click to toggle source
# File lib/hub_link/stream.rb, line 5
def initialize(repo, since: nil)
  @repo = repo
  @since = since&.to_date
end

Public Instance Methods

in_batches() { |batch| ... } click to toggle source
# File lib/hub_link/stream.rb, line 10
def in_batches(&block)
  page = 1
  loop do
    batch = Batch.new(repo: repo, since: since, page: page)
    break if batch.empty?
    yield batch
    page += 1
  end
end