Skip to content

Commit

Permalink
Remember the options passed and expose them via attr_reader
Browse files Browse the repository at this point in the history
  • Loading branch information
chessbyte committed May 4, 2020
1 parent 563af11 commit 8c98cb0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions prs_per_repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
require 'optimist'

class PrsPerRepo
attr_reader :config, :config_file, :output_file, :sprint
attr_reader :opts, :config, :output_file, :sprint

def initialize(opts)
@sprint = find_sprint(opts[:sprint])
if @sprint.nil?
STDERR.puts "invalid sprint specified"
exit
end

@config_file = opts[:config_file]
@config = YAML.load_file(@config_file)
@opts = opts
config_file = opts[:config_file]
@config = YAML.load_file(config_file)

@output_file = opts[:output_file] || "prs_per_repo.csv"
@github_org = "ManageIQ"
Expand Down

0 comments on commit 8c98cb0

Please sign in to comment.