Class: Origen::Tester::Doc::Generator::TestGroup
- Inherits:
-
Object
- Object
- Origen::Tester::Doc::Generator::TestGroup
- Includes:
- Enumerable
- Defined in:
- lib/origen/tester/doc/generator/test_group.rb
Constant Summary
Constant Summary
Constants included from Enumerable
Instance Attribute Summary (collapse)
-
- (Object) append_version
Returns the value of attribute append_version.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) version
Returns the value of attribute version.
Instance Method Summary (collapse)
- - (Object) <<(instance)
- - (Object) ==(other_instance_group)
- - (Object) each
-
- (TestGroup) initialize(name, _options = {})
constructor
A new instance of TestGroup.
- - (Object) size
- - (Object) to_yaml(options = {})
- - (Object) unversioned_name
Methods included from Enumerable
Constructor Details
- (TestGroup) initialize(name, _options = {})
Returns a new instance of TestGroup
10 11 12 13 14 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 10 def initialize(name, = {}) @name = name @store = [] @append_version = true end |
Instance Attribute Details
- (Object) append_version
Returns the value of attribute append_version
6 7 8 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 6 def append_version @append_version end |
- (Object) name
Returns the value of attribute name
6 7 8 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 6 def name @name end |
- (Object) version
Returns the value of attribute version
6 7 8 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 6 def version @version end |
Instance Method Details
- (Object) <<(instance)
42 43 44 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 42 def <<(instance) @store << instance end |
- (Object) ==(other_instance_group)
54 55 56 57 58 59 60 61 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 54 def ==(other_instance_group) self.class == other_instance_group.class && unversioned_name.to_s == other_instance_group.unversioned_name.to_s && size == other_instance_group.size && self.all? do |ins| other_instance_group.any? { |other_ins| ins == other_ins } end end |
- (Object) each
50 51 52 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 50 def each @store.each { |ins| yield ins } end |
- (Object) size
46 47 48 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 46 def size @store.size end |
- (Object) to_yaml(options = {})
26 27 28 29 30 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 26 def to_yaml( = {}) y = {} y['group'] = @store.map { |t| t.to_yaml() } y end |
- (Object) unversioned_name
32 33 34 35 36 37 38 39 40 |
# File 'lib/origen/tester/doc/generator/test_group.rb', line 32 def unversioned_name if @name if @name =~ /grp$/ @name else "#{@name}_grp" end end end |