class ShipdStyle::CopyDirectory

Public Instance Methods

make_directory() click to toggle source
# File lib/shipd_style/copy_directory.rb, line 9
def make_directory
  FileUtils.mkdir_p(path) unless File.exist?(path)
end
perform() click to toggle source
# File lib/shipd_style/copy_directory.rb, line 3
def perform
  make_directory
  # still using tick marks because of the * at the end of the path
  `cp -r #{source_directory} #{path}`
end
source_directory() click to toggle source
# File lib/shipd_style/copy_directory.rb, line 13
def source_directory
  File.expand_path(File.dirname(__FILE__) + "/../#{directory_name}/*" )
end