Sha256: 87735422d50d16919cf049b5b9ecc9324756dc7a5b031d9b9485709e0de96f01

Contents?: true

Size: 967 Bytes

Versions: 18

Compression:

Stored size: 967 Bytes

Contents

module Origen
  module Tester
    class Ultraflex
      class Parser
        class DCSpec
          attr_accessor :parser
          attr_accessor :name, :categories
          alias_method :symbol, :name

          def initialize(name, categories, options = {})
            @parser = options[:parser]
            @name = name
            @categories = categories
            @values = {}
          end

          def add_values(components)
            @categories.each_with_index do |category, i|
              @values[category] ||= {}
              @values[category]['Typ'] ||= components[5 + (i * 3) + 0]
              @values[category]['Min'] ||= components[5 + (i * 3) + 1]
              @values[category]['Max'] ||= components[5 + (i * 3) + 2]
            end
          end

          def lookup(category, selector)
            v = @values[category]
            if v
              v[selector]
            end
          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/ultraflex/parser/dc_spec.rb
origen-0.2.5 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.2.4 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.2.3 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.2.2 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.2.1 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.2.0 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.1.3 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.1.2 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.1.1 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.1.0 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.9 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.8 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.6 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.5 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.4 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.3 lib/origen/tester/ultraflex/parser/dc_spec.rb
origen-0.0.2 lib/origen/tester/ultraflex/parser/dc_spec.rb