Class: RailsTemplater::Templater
- Inherits:
-
Object
- Object
- RailsTemplater::Templater
- Defined in:
- lib/rails_templater/templater.rb
Instance Attribute Summary collapse
-
#post_bundler_strategies ⇒ Object
readonly
Returns the value of attribute post_bundler_strategies.
Instance Method Summary collapse
- #fixture_replacement ⇒ Object
-
#initialize ⇒ Templater
constructor
A new instance of Templater.
- #javascript_framework ⇒ Object
- #orm ⇒ Object
- #post_bundler(&block) ⇒ Object
- #recipe(name) ⇒ Object
- #template_engine ⇒ Object
- #testing_framework ⇒ Object
Constructor Details
#initialize ⇒ Templater
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_strategies ⇒ Object (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_replacement ⇒ Object
11 12 13 |
# File 'lib/rails_templater/templater.rb', line 11 def fixture_replacement @fixture_replacement ||= FixtureReplacement.new end |
#javascript_framework ⇒ Object
19 20 21 |
# File 'lib/rails_templater/templater.rb', line 19 def javascript_framework @javascript_framework ||= JavaScriptFramework.new end |
#orm ⇒ Object
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.("recipes/#{name}.rb", @template_framework_path) end |
#template_engine ⇒ Object
23 24 25 |
# File 'lib/rails_templater/templater.rb', line 23 def template_engine @template_engine ||= TemplateEngine.new end |
#testing_framework ⇒ Object
48 49 50 |
# File 'lib/rails_templater/templater.rb', line 48 def testing_framework @testing_framework ||= TestingFramework.new end |