Added a standalone page for library

This commit is contained in:
Šesták Vít
2017-06-20 01:16:32 +02:00
parent 2d0651cfc7
commit c55c37fa9a
5 changed files with 30 additions and 3 deletions

View File

@@ -33,6 +33,12 @@ final case class Hashes(sha1: String, md5: String){
def serialized = s"$sha1-$md5"
}
object Hashes {
def unserialize(str: String): com.ysoft.odc.Hashes = str.split('-') match {
case Array(sha1, md5) => Hashes(sha1 = sha1, md5 = md5)
}
}
final case class Exclusion(sha1: String) extends AnyVal {
def matches(dependency: Dependency): Boolean = dependency.sha1 == sha1
def matches(group: GroupedDependency): Boolean = group.sha1 == sha1