class Souschef::Template::Metadata
Creates a well defined maetadata.rb
Attributes
cookbook[RW]
Public Class Methods
new(opts)
click to toggle source
Calls superclass method
Souschef::Template::Base::new
# File lib/souschef/template/metadata.rb, line 8 def initialize(opts) super(opts) end
Public Instance Methods
create()
click to toggle source
Public - Create file start
cookbook - String cookbook name
Returns nil
# File lib/souschef/template/metadata.rb, line 17 def create tmpl = ERB.new(load_erb_file('metadata.erb')) @cookbook = @opts[:cookbook] @maintainer = @opts[:souschef][:maintainer] @maintainer_email = @opts[:souschef][:maintainer_email] @license = @opts[:souschef][:license] data = tmpl.result(binding) info 'Updating metadata.rb' write_file(cookbook_file_path('metadata.rb'), data) end