Module: Rundoc::CodeCommand::FileUtil
- Included in:
- Rundoc::CodeCommand::FileCommand::AppendRunner, Rundoc::CodeCommand::FileCommand::RemoveRunner, WriteRunner
- Defined in:
- lib/rundoc/code_command/write.rb
Instance Method Summary collapse
Instance Method Details
#filename ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/rundoc/code_command/write.rb', line 6 def filename files = Dir.glob(@filename) if files.length > 1 raise "Filename glob #{@filename.inspect} matched more than one file. Be more specific to only match one file. Matches:\n" + files.join(" \n") end files.first || @filename end |
#mkdir_p ⇒ Object
14 15 16 17 |
# File 'lib/rundoc/code_command/write.rb', line 14 def mkdir_p dir = File.("../", filename) FileUtils.mkdir_p(dir) end |