Method: QCS#initialize
- Defined in:
- lib/qcs.rb
#initialize(filePath) ⇒ QCS
Returns a new instance of QCS.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/qcs.rb', line 19 def initialize(filePath) fileText = IO.read(filePath) @repos = Array.new JSON.parse(fileText).each do |repo| name = repo["name"] url = repo["url"] branch = repo["branch"] parsed = RepoInfo.new(name, url, branch) @repos.push(parsed) if repo["isMain"] == 1 @mainPro = parsed end end end |