Method: Puppet::ModuleTool::Checksums#data
- Defined in:
- lib/puppet/module_tool/checksums.rb
#data ⇒ Object Also known as: to_data_hash, to_hash
Return checksums for object’s Pathname, generate if it’s needed. Result is a hash of path strings to checksum strings.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/puppet/module_tool/checksums.rb', line 26 def data unless @data @data = {} @path.find do |descendant| if Puppet::ModuleTool.artifact?(descendant) Find.prune elsif descendant.file? path = descendant.relative_path_from(@path) @data[path.to_s] = checksum(descendant) end end end return @data end |