Add helper method

This commit is contained in:
Alexandre Archambault 2020-05-29 15:46:00 +02:00
parent 5e5939d693
commit d8ea3b91d5
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,8 @@ import dataclass.data
object ModuleMatchers {
def all: ModuleMatchers =
ModuleMatchers(Set.empty, Set.empty)
def only(organization: String, moduleName: String): ModuleMatchers =
ModuleMatchers(Set.empty, Set(Module(Organization(organization), ModuleName(moduleName), Map())), includeByDefault = false)
def only(mod: Module): ModuleMatchers =
ModuleMatchers(Set.empty, Set(mod), includeByDefault = false)
}