class Agilib::Composer::Templater
Attributes
post_bundler_strategies[R]
Public Class Methods
new()
click to toggle source
# File lib/agilib/composer/templater.rb, line 7 def initialize @post_bundler_strategies = [] @template_framework_path = File.join(File.dirname(__FILE__), 'templates') end
Public Instance Methods
load_snippet(name, group)
click to toggle source
# File lib/agilib/composer/templater.rb, line 24 def load_snippet(name, group) group_path = snippet_path(group) File.read File.expand_path("#{name}.rb", group_path) end
post_bundler(&block)
click to toggle source
# File lib/agilib/composer/templater.rb, line 12 def post_bundler(&block) @post_bundler_strategies << block end
recipe(name)
click to toggle source
# File lib/agilib/composer/templater.rb, line 16 def recipe(name) File.expand_path("recipes/#{name}.rb", @template_framework_path) end
snippet_path(group)
click to toggle source
# File lib/agilib/composer/templater.rb, line 20 def snippet_path(group) File.expand_path("snippets/#{group}", @template_framework_path) end