Class: VFS::FileCollector
- Inherits:
-
Object
- Object
- VFS::FileCollector
- Defined in:
- lib/yaml-vfs/file_collector.rb
Overview
vfs gen
Instance Method Summary collapse
-
#initialize(entrys) ⇒ FileCollector
constructor
A new instance of FileCollector.
- #write_mapping(name) ⇒ Object
Constructor Details
#initialize(entrys) ⇒ FileCollector
Returns a new instance of FileCollector.
74 75 76 77 |
# File 'lib/yaml-vfs/file_collector.rb', line 74 def initialize(entrys) @entrys = entrys || [] @vfs_writer = YAMLVFSWriter.new end |
Instance Method Details
#write_mapping(name) ⇒ Object
79 80 81 82 83 84 85 86 87 |
# File 'lib/yaml-vfs/file_collector.rb', line 79 def write_mapping(name) stream = add_write_file path = Pathname(name). unless VFS_FILES_EXTENSIONS.include?(File.extname(path)) path.mkpath unless path.exist? path = path.join('all-product-headers.yaml') end update_changed_file(path, stream) end |