Sha256: 3b6cd01ecf47d5a7baca63f43d9370611db08565bbfb7ef717e060dcba11a315

Contents?: true

Size: 725 Bytes

Versions: 30

Compression:

Stored size: 725 Bytes

Contents

module PowerStencil
  module Plugins

    module Templates

      def register_plugin_templates_templates
        return unless capabilities[:templates]
        logger.info "Loading '#{self.name}' plugin templates..."
        plugin_definition[:templates].each do |templates_path|
          plugin_templates_path = File.join self.plugin_path, templates_path
          Dir.entries(plugin_templates_path).reject { |e| %w(. ..).include? e }.each do |entry|
            template_path = File.join(plugin_templates_path, entry)
            if Dir.exist? template_path
              project.register_template_template_path_for_type entry.to_sym, template_path
            end
          end
        end
      end

    end

  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
power_stencil-0.10.0 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.8 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.7 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.6 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.5 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.4 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.3 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.2 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.1 lib/power_stencil/plugins/templates.rb
power_stencil-0.9.0 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.14 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.13 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.12 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.11 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.10 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.9 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.8 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.7 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.6 lib/power_stencil/plugins/templates.rb
power_stencil-0.8.5 lib/power_stencil/plugins/templates.rb