Class: Texas::Build::Task::AddDefaultTemplatesToBuildPath
- Inherits:
-
Base
- Object
- Base
- Texas::Build::Task::AddDefaultTemplatesToBuildPath
show all
- Defined in:
- lib/texas/build/task/add_default_templates_to_build_path.rb
Instance Attribute Summary
Attributes inherited from Base
#build
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#build_path ⇒ Object
5
6
7
|
# File 'lib/texas/build/task/add_default_templates_to_build_path.rb', line 5
def build_path
build.__path__
end
|
#run ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/texas/build/task/add_default_templates_to_build_path.rb', line 9
def run
glob = File.join(Texas.texas_dir, Texas.contents_subdir_name, '*.*')
Dir[glob].each do |filename|
dest = File.join(build_path, File.basename(filename))
unless File.exists?(dest)
FileUtils.cp filename, build_path
end
end
end
|