Class: Mexico::FileSystem::Design
- Inherits:
-
Object
- Object
- Mexico::FileSystem::Design
- Includes:
- Core::DesignCore, BoundToCorpus, Poseidon, ROXML
- Defined in:
- lib/mexico/file_system/design.rb
Instance Attribute Summary
Attributes included from BoundToCorpus
Instance Method Summary collapse
- #after_parse ⇒ Object
-
#initialize(opts = {}) ⇒ Design
constructor
Creates a new design object.
-
#trials ⇒ Array<Trial>
Returns a collection of trials that are associated with this design.
Methods included from Core::DesignCore
Methods included from BoundToCorpus
Constructor Details
#initialize(opts = {}) ⇒ Design
Creates a new design object.
57 58 59 60 61 |
# File 'lib/mexico/file_system/design.rb', line 57 def initialize(opts={}) [:identifier,:name,:description].each do |att| send("#{att}=", opts[att]) if opts.has_key?(att) end end |
Instance Method Details
#after_parse ⇒ Object
70 71 72 73 74 |
# File 'lib/mexico/file_system/design.rb', line 70 def after_parse design_components.each do |dc| dc.design = self end end |
#trials ⇒ Array<Trial>
Returns a collection of trials that are associated with this design.
65 66 67 |
# File 'lib/mexico/file_system/design.rb', line 65 def trials @corpus.trials.select{ |i| i.design === self } end |