Class: Souschef::Template::Rakefile
- Defined in:
- lib/souschef/template/rakefile.rb
Overview
Add Rakefile for testing support
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create ⇒ Object
Public - Create a Rakefile from our Template.
-
#initialize(opts) ⇒ Rakefile
constructor
A new instance of Rakefile.
Constructor Details
#initialize(opts) ⇒ Rakefile
Returns a new instance of Rakefile.
5 6 7 |
# File 'lib/souschef/template/rakefile.rb', line 5 def initialize(opts) super(opts) end |
Instance Method Details
#create ⇒ Object
Public - Create a Rakefile from our Template
cookbook - String Cookbook name
Returns nil
14 15 16 17 18 19 20 |
# File 'lib/souschef/template/rakefile.rb', line 14 def create tmpl = ERB.new(load_erb_file('rakefile.erb')) data = tmpl.result(binding) info 'Setting up Rakefile' write_file(cookbook_file_path('Rakefile'), data) end |