Sha256: 9e7064f04ea698cf41dfb6a551528427007a5ea480fdc65a7a7b7a41e7d46338

Contents?: true

Size: 792 Bytes

Versions: 18

Compression:

Stored size: 792 Bytes

Contents

module Origen
  module Tester
    class J750
      class Parser
        class PatternSets < Origen::Tester::Parser::SearchableHash
          attr_accessor :parser

          def initialize(options = {})
            @parser = options[:parser]
          end

          def import(file)
            File.readlines(file).each do |line|
              name = PatternSet.extract_name(line)
              if name
                if self[name]
                  self[name].add_pattern_line(line)
                else
                  l = PatternSet.new(line, parser: parser)
                  self[l.name] = l if l.valid?
                end
              end
            end
          end

          def inspect
            "<Patsets: #{size}>"
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
origen-0.2.6 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.5 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.4 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.3 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.2 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.1 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.2.0 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.1.3 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.1.2 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.1.1 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.1.0 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.9 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.8 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.6 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.5 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.4 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.3 lib/origen/tester/j750/parser/pattern_sets.rb
origen-0.0.2 lib/origen/tester/j750/parser/pattern_sets.rb