Module: Converter::FileSystem
- Included in:
- Converter
- Defined in:
- lib/tasks/converter/filesystem.rb
Instance Method Summary collapse
Instance Method Details
#read_files(path, files) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tasks/converter/filesystem.rb', line 3 def read_files(path, files) contents = {} full_path = File.join(@src_path, path) if File.directory?(full_path) files.each do |file| contents[file] = File.read(File.join(full_path, file), mode: 'rb') || '' end contents end end |