Class: GithubDailyUpdate::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/github_daily_update/report.rb

Overview

The main report generation class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Report

Returns a new instance of Report.



5
6
7
8
9
10
11
# File 'lib/github_daily_update/report.rb', line 5

def initialize(options = {})
  client = ::Octokit::Client.new
  @reporters = [
    GithubDailyUpdate::Reporter::Merged.new(client, options),
    GithubDailyUpdate::Reporter::OpenPulls.new(client, options)
  ]
end

Instance Attribute Details

#reportersObject

Returns the value of attribute reporters.



3
4
5
# File 'lib/github_daily_update/report.rb', line 3

def reporters
  @reporters
end

Instance Method Details

#generateObject



13
14
15
# File 'lib/github_daily_update/report.rb', line 13

def generate
  @reporters.map { |r| r.generate }
end