Class: OrigenTesters::IGXLBasedTester::Base::PatsetPattern
- Inherits:
-
Object
- Object
- OrigenTesters::IGXLBasedTester::Base::PatsetPattern
show all
- Defined in:
- lib/origen_testers/igxl_based_tester/base/patset_pattern.rb
Constant Summary
collapse
- ALIASES =
{
pattern: :file_name
}
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(patset, attrs = {}) ⇒ PatsetPattern
Returns a new instance of PatsetPattern.
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/origen_testers/igxl_based_tester/base/patset_pattern.rb', line 34
def initialize(patset, attrs = {})
self.class::PATSET_DEFAULTS.each do |k, v|
send("#{k}=", v)
end
self.pattern_set = patset
attrs.each do |k, v|
send("#{k}=", v)
end
end
|
Class Method Details
.define ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/origen_testers/igxl_based_tester/base/patset_pattern.rb', line 9
def self.define
self::PATSET_ATTRS.each do |attr|
writer = "#{attr}=".to_sym
reader = attr.to_sym
attr_reader attr.to_sym unless method_defined? reader
attr_writer attr.to_sym unless method_defined? writer
end
ALIASES.each do |_alias, val|
writer = "#{_alias}=".to_sym
reader = _alias.to_sym
unless method_defined? writer
define_method("#{_alias}=") do |v|
send("#{val}=", v)
end
end
unless method_defined? reader
define_method("#{_alias}") do
send(val)
end
end
end
end
|
Instance Method Details
#to_s ⇒ Object
46
47
48
49
50
51
52
|
# File 'lib/origen_testers/igxl_based_tester/base/patset_pattern.rb', line 46
def to_s
l = "\t"
self.class::PATSET_ATTRS.each do |attr|
l += "#{send(attr)}\t"
end
"#{l}"
end
|