Class: PuppetGenerator::ExportFilters::FilesystemAttributes
- Inherits:
-
Object
- Object
- PuppetGenerator::ExportFilters::FilesystemAttributes
- Defined in:
- lib/puppet_generator/export_filters/filesystem_attributes.rb
Instance Method Summary collapse
Instance Method Details
#convert(objects) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet_generator/export_filters/filesystem_attributes.rb', line 4 def convert(objects) objects.collect do |o| path = o[:name] if File.exists? path fs_object_info = stats(path) o.merge!( { type: type(path), owner: owner(fs_object_info), mode: mode(fs_object_info), } ) end o end end |