Sha256: b45d270d7a9b017d5235f0b73e1389804f6c3436f57f49d5b3baf9af0714fa22

Contents?: true

Size: 901 Bytes

Versions: 6

Compression:

Stored size: 901 Bytes

Contents

module PowerStencil
  module Plugins

    module Build

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

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

    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
power_stencil-0.10.0 lib/power_stencil/plugins/build.rb
power_stencil-0.9.8 lib/power_stencil/plugins/build.rb
power_stencil-0.9.7 lib/power_stencil/plugins/build.rb
power_stencil-0.9.6 lib/power_stencil/plugins/build.rb
power_stencil-0.9.5 lib/power_stencil/plugins/build.rb
power_stencil-0.9.4 lib/power_stencil/plugins/build.rb