Class: RailsTemplater::Templater

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_templater/templater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTemplater

Returns a new instance of Templater.



6
7
8
9
# File 'lib/rails_templater/templater.rb', line 6

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

Instance Attribute Details

#post_bundler_strategiesObject (readonly)

Returns the value of attribute post_bundler_strategies.



4
5
6
# File 'lib/rails_templater/templater.rb', line 4

def post_bundler_strategies
  @post_bundler_strategies
end

Instance Method Details

#fixture_replacementObject



11
12
13
# File 'lib/rails_templater/templater.rb', line 11

def fixture_replacement
  @fixture_replacement ||= FixtureReplacement.new
end

#javascript_frameworkObject



19
20
21
# File 'lib/rails_templater/templater.rb', line 19

def javascript_framework
  @javascript_framework ||= JavaScriptFramework.new
end

#ormObject



15
16
17
# File 'lib/rails_templater/templater.rb', line 15

def orm
  @orm ||= Orm.new
end

#post_bundler(&block) ⇒ Object



27
28
29
# File 'lib/rails_templater/templater.rb', line 27

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

#recipe(name) ⇒ Object



31
32
33
# File 'lib/rails_templater/templater.rb', line 31

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

#template_engineObject



23
24
25
# File 'lib/rails_templater/templater.rb', line 23

def template_engine
  @template_engine ||= TemplateEngine.new
end

#testing_frameworkObject



48
49
50
# File 'lib/rails_templater/templater.rb', line 48

def testing_framework
  @testing_framework ||= TestingFramework.new
end