Class: HubLink::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/hub_link/stream.rb

Constant Summary collapse

GITHUB_BATCH_SIZE =

Days

7

Instance Method Summary collapse

Constructor Details

#initialize(repo, start_date: nil) ⇒ Stream

Returns a new instance of Stream.



8
9
10
11
# File 'lib/hub_link/stream.rb', line 8

def initialize(repo, start_date: nil)
  @repo = repo
  @start_date = (start_date || date_of_first_pr).to_date
end

Instance Method Details

#in_batches(&block) ⇒ Object



13
14
15
16
17
# File 'lib/hub_link/stream.rb', line 13

def in_batches(&block)
  queries.each do |query|
    yield Batch.new(query)
  end
end