Sha256: bda1615546206d1fa2e760522424e9bd09fd66bf0387617823e2702f7cdd6597

Contents?: true

Size: 721 Bytes

Versions: 12

Compression:

Stored size: 721 Bytes

Contents

module Agilib
  module Composer
    class Templater

      attr_reader :post_bundler_strategies

      def initialize
        @post_bundler_strategies = []
        @template_framework_path = File.join(File.dirname(__FILE__), 'templates')
      end

      def post_bundler(&block)
        @post_bundler_strategies << block
      end

      def recipe(name)
        File.expand_path("recipes/#{name}.rb", @template_framework_path)
      end

      def snippet_path(group)
        File.expand_path("snippets/#{group}", @template_framework_path)
      end

      def load_snippet(name, group)
        group_path = snippet_path(group)
        File.read  File.expand_path("#{name}.rb", group_path)
      end

    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
agilib-0.1.9 lib/agilib/composer/templater.rb
agilib-0.1.8 lib/agilib/composer/templater.rb
agilib-0.1.7 lib/agilib/composer/templater.rb
agilib-0.1.6 lib/agilib/composer/templater.rb
agilib-0.1.5 lib/agilib/composer/templater.rb
agilib-0.1.4 lib/agilib/composer/templater.rb
agilib-0.1.3 lib/agilib/composer/templater.rb
agilib-0.1.2.beta6 lib/agilib/composer/templater.rb
agilib-0.1.2.beta5 lib/agilib/composer/templater.rb
agilib-0.1.2.beta4 lib/agilib/composer/templater.rb
agilib-0.1.2.beta3 lib/agilib/composer/templater.rb
agilib-0.1.2.beta2 lib/agilib/composer/templater.rb