Class: OrigenSim::Artifacts::Artifacts
- Inherits:
-
Object
- Object
- OrigenSim::Artifacts::Artifacts
- Includes:
- Origen::Componentable
- Defined in:
- lib/origen_sim/simulator/artifacts.rb
Constant Summary collapse
- COMPONENTABLE_ADDS_ACCESSORS =
Disable accessors on the simulator. Artifact retrieval must use simulator.artifact
false
- COMPONENTABLE_SINGLETON_NAME =
Clean up the names a bit. Componentable assumes the class name is the singleton name, but we’re doing the opposite here.
'artifact'
- COMPONENTABLE_PLURAL_NAME =
'artifacts'
Instance Method Summary collapse
-
#add(name, options = {}, &block) ⇒ Object
Force the class to be an OrigenSim::Artifacts::Artifact.
- #clean ⇒ Object
-
#initialize ⇒ Artifacts
constructor
A new instance of Artifacts.
- #populate ⇒ Object
Constructor Details
Instance Method Details
#add(name, options = {}, &block) ⇒ Object
Force the class to be an OrigenSim::Artifacts::Artifact
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/origen_sim/simulator/artifacts.rb', line 19 def add(name, = {}, &block) instances = _split_by_instances(name, , &block) return_instances = [] instances.each do |n, opts| opts[:class_name] = OrigenSim::Artifacts::Artifact return_instances << _add(n, opts) end return_instances.size == 1 ? return_instances.first : return_instances end |
#clean ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/origen_sim/simulator/artifacts.rb', line 39 def clean artifacts.each do |name, artifact| Origen.log.info "Cleaning artifact: #{artifact.run_target}" artifact.clean end true end |