Sha256: 676ea60826fa986e3bd034b6ff87b60bca1de345b88cac91cc8bd13ad7b9d2ce

Contents?: true

Size: 333 Bytes

Versions: 6

Compression:

Stored size: 333 Bytes

Contents

require 'tempfile'

class ManifestFileFactory
  @manifests = {}

  def self.build(content)
    key = content.hash
    @manifests[key] or (@manifests[key] = build_file(content))
    @manifests[key]
  end

  def self.build_file(content)
    f = Tempfile.new(["testing_manifest", '.pp'])
    f.write content
    f.close
    f
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kafo_module_lint-1.3.0 test/manifest_file_factory.rb
kafo_module_lint-1.1.0 test/manifest_file_factory.rb
kafo_module_lint-1.0.3 test/manifest_file_factory.rb
kafo_module_lint-1.0.2 test/manifest_file_factory.rb
kafo_module_lint-1.0.1 test/manifest_file_factory.rb
kafo_module_lint-1.0.0 test/manifest_file_factory.rb