All files / src/runtime repository.coffee

100% Statements 5/5
66.67% Branches 4/6
100% Functions 2/2
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 111x   19x 38x       66x   33x  
cql = require '../cql'
module.exports.Repository = class Repository
  constructor: (@data) ->
    @libraries = for k,v of @data
       v
 
  resolve: (library,version) ->
    for lib in @libraries
      if lib.library?.identifier?.id == library && lib.library?.identifier?.version == version
        return new cql.Library(lib,@)