Class: OrigenTesters::IGXLBasedTester::Parser::PatternSets
- Inherits:
-
Parser::SearchableHash
- Object
- Hash
- Parser::SearchableHash
- OrigenTesters::IGXLBasedTester::Parser::PatternSets
- Defined in:
- lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb
Instance Attribute Summary collapse
-
#parser ⇒ Object
Returns the value of attribute parser.
Instance Method Summary collapse
- #import(file) ⇒ Object
-
#initialize(options = {}) ⇒ PatternSets
constructor
A new instance of PatternSets.
- #inspect ⇒ Object
Methods inherited from Parser::SearchableHash
Constructor Details
#initialize(options = {}) ⇒ PatternSets
Returns a new instance of PatternSets.
7 8 9 |
# File 'lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb', line 7 def initialize( = {}) @parser = [:parser] end |
Instance Attribute Details
#parser ⇒ Object
Returns the value of attribute parser.
5 6 7 |
# File 'lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb', line 5 def parser @parser end |
Instance Method Details
#import(file) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb', line 11 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 |
#inspect ⇒ Object
25 26 27 |
# File 'lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb', line 25 def inspect "<Patsets: #{size}>" end |