Sha256: a5ed0eab9ece7788517cd38e4fed5351c8ebccd655deee499a65b25730bea777
Contents?: true
Size: 1002 Bytes
Versions: 18
Compression:
Stored size: 1002 Bytes
Contents
module Origen module Tester class J750 module Generator class Patgroups include Origen::Tester::Generator TEMPLATE = "#{Origen.top}/lib/origen/tester/j750/generator/templates/patgroups.txt.erb" OUTPUT_POSTFIX = 'patgroups' def add(name, options = {}) p = Patgroup.new(name, options) collection << p p end def finalize(_options = {}) uniq! sort! end # Present the patgroups in the final sheet in alphabetical order def sort! collection.sort_by!(&:name) end # Removes all duplicate patgroups def uniq! uniques = [] collection.each do |patgroup| unless uniques.any? { |p| p == patgroup } uniques << patgroup end end self.collection = uniques end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems