Module: Formatron::Generators::Util::Gitignore

Defined in:
lib/formatron/generators/util/gitignore.rb

Overview

generates placeholder README.md

Class Method Summary collapse

Class Method Details

.write(directory) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/formatron/generators/util/gitignore.rb', line 6

def self.write(directory)
  FileUtils.mkdir_p directory
  readme = File.join directory, '.gitignore'
  File.write readme, <<-EOH.gsub(/^ {12}/, '')
    /.formatron/
  EOH
end