module PowerStencil module Plugins module Build def post_build_hook(*args) build_method_name = plugin_definition[:build] msg = "Plugin '#{self.name}' doesn't contain the '#{build_method_name}' method in the '#{plugin_definition[:plugin_module]}' module. Cannot build !" raise PowerStencil::Error, msg unless plugin_module.respond_to? build_method_name plugin_module.send build_method_name, *args end end end end