Sha256: 7e842fb3733629c58ef25f78f37a6845f8b05b27241b1dd98283a3f77c305ee0

Contents?: true

Size: 825 Bytes

Versions: 106

Compression:

Stored size: 825 Bytes

Contents

module OrigenTesters
  module IGXLBasedTester
    class Base
      class Patsubrs
        include ::OrigenTesters::Generator

        OUTPUT_POSTFIX = 'patsubrs'

        def add(name, options = {})
          p = Patsubr.new(name, options)
          collection << p
          p
        end

        def finalize(options = {})
          uniq!
          sort!
        end

        # Present the patsubrs in the final sheet in alphabetical order
        def sort!
          collection.sort_by!(&:name)
        end

        # Removes all duplicate patsubrs
        def uniq!
          uniques = []
          collection.each do |patsubr|
            unless uniques.any? { |p| p == patsubr }
              uniques << patsubr
            end
          end
          self.collection = uniques
        end
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
origen_testers-0.7.11 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.10 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.9 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.8 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.7 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.6 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.5 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.4 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.3 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.2 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.1 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.0 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.7.0.pre0 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.6.2 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.6.1 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.6.0 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.5.7 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.5.6 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.5.5 lib/origen_testers/igxl_based_tester/base/patsubrs.rb
origen_testers-0.5.4 lib/origen_testers/igxl_based_tester/base/patsubrs.rb