Class: Origen::Tester::Doc::Generator::Tests
- Inherits:
-
Object
- Object
- Origen::Tester::Doc::Generator::Tests
- Defined in:
- lib/origen/tester/doc/generator/tests.rb
Defined Under Namespace
Classes: IndexedString
Instance Attribute Summary (collapse)
-
- (Object) collection
Returns the value of attribute collection.
Instance Method Summary (collapse)
- - (Object) add(name, attrs = {})
-
- (Object) group(name = nil, options = {}) {|@current_group| ... }
(also: #add_group)
Arbitrarily group a subset of tests together, see the J750 API for details on how to use this.
-
- (Tests) initialize
constructor
A new instance of Tests.
- - (Object) render(_file, _options = {})
Constructor Details
- (Tests) initialize
Returns a new instance of Tests
8 9 10 |
# File 'lib/origen/tester/doc/generator/tests.rb', line 8 def initialize @collection = [] end |
Instance Attribute Details
- (Object) collection
Returns the value of attribute collection
6 7 8 |
# File 'lib/origen/tester/doc/generator/tests.rb', line 6 def collection @collection end |
Instance Method Details
- (Object) add(name, attrs = {})
20 21 22 23 24 25 26 27 28 |
# File 'lib/origen/tester/doc/generator/tests.rb', line 20 def add(name, attrs = {}) test = Test.new(name, attrs) if @current_group @current_group << test else collection << test end test end |
- (Object) group(name = nil, options = {}) {|@current_group| ... } Also known as: add_group
Arbitrarily group a subset of tests together, see the J750 API for details on how to use this.
32 33 34 35 36 37 38 |
# File 'lib/origen/tester/doc/generator/tests.rb', line 32 def group(name = nil, = {}) name, = nil, name if name.is_a?(Hash) @current_group = TestGroup.new(name, ) collection << @current_group yield @current_group @current_group = nil end |
- (Object) render(_file, _options = {})
41 42 |
# File 'lib/origen/tester/doc/generator/tests.rb', line 41 def render(_file, = {}) end |