class Souschef::Template::Readme

Updates README.md inside cookbook folder

Public Class Methods

new(opts) click to toggle source
Calls superclass method Souschef::Template::Base::new
# File lib/souschef/template/readme.rb, line 5
def initialize(opts)
  super(opts)
end

Public Instance Methods

create() click to toggle source

Public - Create standardised README

Return nil

# File lib/souschef/template/readme.rb, line 12
def create
  tmpl = ERB.new(load_erb_file('readme.erb'))
  @cookbook = @opts[:cookbook]
  @maintainer = @opts[:souschef][:maintainer]
  @maintainer_email = @opts[:souschef][:maintainer_email]
  data = tmpl.result(binding)

  info 'Updating README file'
  write_file(cookbook_file_path('README.md'), data)
end