Sha256: 3c0b6864a0e3254f0a3a7c4f6c6d52c486ebde9552869f1cb947f445995a9a14
Contents?: true
Size: 604 Bytes
Versions: 6
Compression:
Stored size: 604 Bytes
Contents
class ManifestFactory def self.build(parameters = {}) manifest = StringIO.new manifest << <<EOS # This manifest is used for testing # # === Parameters # EOS parameters.each do |param, type| manifest.puts "# $#{param}:: a parameter for #{param}" manifest.puts "# #{' ' * param.length} type:#{type}" if type end manifest.puts "class testing#{counter}(" parameters.keys.each do |param| manifest.puts " $#{param}," end manifest.puts ') { }' manifest.string end def self.counter @counter = 0 if @counter.nil? @counter += 1 end end
Version data entries
6 entries across 6 versions & 1 rubygems