Class: Skeleton
- Inherits:
-
Object
- Object
- Skeleton
- Defined in:
- lib/asker/skeleton.rb
Instance Method Summary collapse
Instance Method Details
#create_configuration ⇒ Object
8 9 10 11 12 13 |
# File 'lib/asker/skeleton.rb', line 8 def create_configuration puts "\nCreating configuration files" src = File.join(File.dirname(__FILE__), "files", Asker::CONFIGFILE) dst = File.join(Asker::CONFIGFILE) copyfile(src, dst) end |
#create_input(inputpath) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/asker/skeleton.rb', line 15 def create_input(inputpath) puts "\nCreating example input #{Rainbow(inputpath).bright}" if File.extname(inputpath) == ".haml" dirpath = File.dirname(inputpath) filename = File.basename(inputpath) else dirpath = inputpath filename = "example-concept.haml" end create_dir dirpath source = File.join(File.dirname(__FILE__), "files", "example-concept.haml") copyfile(source, File.join(dirpath, filename)) end |