class Pading::Generators::ViewsGenerator

Public Instance Methods

copy_or_fetch() click to toggle source
# File lib/generators/pading/views_generator.rb, line 12
def copy_or_fetch
  # self.class.source_root 它将返回其路径名 -> E:/lym_project/gem/pading/app/views/pading/*.html.erb"
  # 复制文件到指定文件夹
  FileUtils.cp_r "#{self.class.source_root}/.", 'app/views/pading'
end