Class: OrigenTesters::IGXLBasedTester::Base::Patsets
- Inherits:
-
Object
- Object
- OrigenTesters::IGXLBasedTester::Base::Patsets
- Includes:
- Generator
- Defined in:
- lib/origen_testers/igxl_based_tester/base/patsets.rb
Direct Known Subclasses
Constant Summary collapse
- OUTPUT_POSTFIX =
'patsets'
Instance Method Summary collapse
- #add(name, options = {}) ⇒ Object
- #finalize(options = {}) ⇒ Object
-
#sort! ⇒ Object
Present the patsets in the final sheet in alphabetical order.
-
#uniq! ⇒ Object
Removes all duplicate patsets.
Methods included from Generator
#close, #collection, #collection=, #compiler, #current_dir, #dont_diff=, execute_source, #file_extension, #file_pipeline, #filename, #filename=, #identity_map, #import, #inhibit_output, #name, #on_close, original_reference_file, original_reference_file=, #output_file, #output_inhibited?, #platform, #reference_file, #render, #set_flow_description, #stats, #to_be_written?, #write_from_template, #write_to_file
Instance Method Details
#add(name, options = {}) ⇒ Object
9 10 11 12 13 |
# File 'lib/origen_testers/igxl_based_tester/base/patsets.rb', line 9 def add(name, = {}) p = platform::Patset.new(name, ) collection << p p end |
#finalize(options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/origen_testers/igxl_based_tester/base/patsets.rb', line 15 def finalize( = {}) uniq! sort! end |
#sort! ⇒ Object
Present the patsets in the final sheet in alphabetical order
21 22 23 |
# File 'lib/origen_testers/igxl_based_tester/base/patsets.rb', line 21 def sort! collection.sort_by!(&:name) end |
#uniq! ⇒ Object
Removes all duplicate patsets
26 27 28 29 30 31 32 33 34 |
# File 'lib/origen_testers/igxl_based_tester/base/patsets.rb', line 26 def uniq! uniques = [] collection.each do |patset| unless uniques.any? { |p| p == patset } uniques << patset end end self.collection = uniques end |