This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
packaging/src/backends.cr

21 lines
354 B
Crystal

abstract class Package::Backend::Packaging
getter name : String
def initialize(@name)
end
abstract def package(context : Context, package : Package) : Bool
end
class Package::Backend::Splitter
def initialize(&block : Proc(Recipe, Package))
@callback = block
end
def create_split(recipe : Recipe) : Package
@callback.call recipe
end
end