Class: Origen::Tester::J750::Parser::PatternSet::Pattern
- Inherits:
 - 
      Object
      
        
- Object
 - Origen::Tester::J750::Parser::PatternSet::Pattern
 
 - Defined in:
 - lib/origen/tester/j750/parser/pattern_set.rb
 
Constant Summary
- ATTRS =
 %w(pattern_set file_name start_label stop_label comment)
- ALIASES =
 { pattern: :file_name, file: :file_name, name: :file_name }
Instance Attribute Summary (collapse)
- 
  
    
      - (Object) parser 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute parser.
 
Instance Method Summary (collapse)
- - (Object) components
 - 
  
    
      - (Pattern) initialize(line) 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Pattern.
 - - (Object) parse
 - - (Boolean) valid?
 
Constructor Details
- (Pattern) initialize(line)
Returns a new instance of Pattern
      28 29 30 31 32 33 34 35 36  | 
    
      # File 'lib/origen/tester/j750/parser/pattern_set.rb', line 28 def initialize(line) @line = line parse if valid? ATTRS.each_with_index do |attr, i| instance_variable_set("@#{attr}", components[i + 1]) end end end  | 
  
Instance Attribute Details
- (Object) parser
Returns the value of attribute parser
      7 8 9  | 
    
      # File 'lib/origen/tester/j750/parser/pattern_set.rb', line 7 def parser @parser end  | 
  
Instance Method Details
- (Object) components
      47 48 49  | 
    
      # File 'lib/origen/tester/j750/parser/pattern_set.rb', line 47 def components @components ||= [] end  | 
  
- (Object) parse
      38 39 40  | 
    
      # File 'lib/origen/tester/j750/parser/pattern_set.rb', line 38 def parse @components = @line.split("\t") unless @line.strip.empty? end  | 
  
- (Boolean) valid?
      42 43 44 45  | 
    
      # File 'lib/origen/tester/j750/parser/pattern_set.rb', line 42 def valid? components[1] && !components[1].empty? && components[1] != 'Pattern Set' && components[2] && !components[2].empty? end  |