Class: Origen::Tester::J750::Parser::TestInstances
- Inherits:
-
Parser::SearchableHash
- Object
- Hash
- Parser::SearchableHash
- Origen::Tester::J750::Parser::TestInstances
- Defined in:
- lib/origen/tester/j750/parser/test_instances.rb
Instance Attribute Summary (collapse)
-
- (Object) parser
Returns the value of attribute parser.
Instance Method Summary (collapse)
- - (Object) import(file)
-
- (TestInstances) initialize(options = {})
constructor
A new instance of TestInstances.
- - (Object) inspect
Methods inherited from Parser::SearchableHash
Methods inherited from Hash
#filter, #ids, #intersect?, #intersections, #longest_key, #longest_value, #update_common
Constructor Details
- (TestInstances) initialize(options = {})
Returns a new instance of TestInstances
8 9 10 |
# File 'lib/origen/tester/j750/parser/test_instances.rb', line 8 def initialize( = {}) @parser = [:parser] end |
Instance Attribute Details
- (Object) parser
Returns the value of attribute parser
6 7 8 |
# File 'lib/origen/tester/j750/parser/test_instances.rb', line 6 def parser @parser end |
Instance Method Details
- (Object) import(file)
12 13 14 15 16 17 |
# File 'lib/origen/tester/j750/parser/test_instances.rb', line 12 def import(file) File.readlines(file).each do |line| l = TestInstance.new(line, parser: parser) self[l.name] = l if l.valid? end end |
- (Object) inspect
19 20 21 |
# File 'lib/origen/tester/j750/parser/test_instances.rb', line 19 def inspect "<TestInstances: #{size}>" end |