feat: port artefact context to other functions

This commit is contained in:
David Bailey 2023-04-20 09:49:54 +02:00
parent 1878186c4f
commit fe23382dcc
5 changed files with 29 additions and 28 deletions

View file

@ -15,7 +15,9 @@ module Comfpile
@recipes = []
end
def craft(stage, target)
def craft(stage, target, context)
context = @core.sanitize_context context
@recipes.each do |recipe|
match = target
@ -32,7 +34,7 @@ module Comfpile
end
end
new_artefact = Artefact.new(@core, self, stage, target)
new_artefact = Artefact.new(@core, self, stage, target, context)
item = recipe[:block].call(match, new_artefact)