feat: add method_missing to trickle function calls down to parent_artefact

This commit is contained in:
David Bailey 2023-04-17 16:37:35 +02:00
parent 52df7ce2bd
commit 98bce3155d

View file

@ -314,6 +314,14 @@ module Comfpile
@running = false
end
def method_missing(m_name, *args, **opts, &block)
if(@parent_artefact.nil?)
super(m_name, *args, **opts, &block)
else
@parent_artefact.send(m_name, *args, **opts, &block)
end
end
def inspect
"#<Compfile::Artefact #{@stage} #{@target}>"
end