Class: OrigenTesters::IGXLBasedTester::Base::Patgroup::Pattern

Inherits:
Object
  • Object
show all
Defined in:
lib/origen_testers/igxl_based_tester/base/patgroup.rb

Constant Summary collapse

ATTRS =
%w(group_name pattern_file comment)
ALIASES =
{
  pattern: :pattern_file
}
DEFAULTS =
{
}

Instance Method Summary collapse

Constructor Details

#initialize(patgroup, attrs = {}) ⇒ Pattern

Returns a new instance of Pattern.



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/origen_testers/igxl_based_tester/base/patgroup.rb', line 31

def initialize(patgroup, attrs = {})
  # Set the defaults
  DEFAULTS.each do |k, v|
    send("#{k}=", v)
  end
  # Then the values that have been supplied
  self.group_name = patgroup
  attrs.each do |k, v|
    send("#{k}=", v)
  end
end

Instance Method Details

#to_sObject



43
44
45
46
47
48
49
# File 'lib/origen_testers/igxl_based_tester/base/patgroup.rb', line 43

def to_s
  l = "\t"
  ATTRS.each do |attr|
    l += "#{send(attr)}\t"
  end
  "#{l}"
end