class Mexico::FileSystem::Design

Public Class Methods

new(opts={}) click to toggle source

Creates a new design object. @option opts [String] :identifier The identifier of the new design (required). @option opts [String] :name The name of the new design. (required). @option opts [String] :description A description of the new design (optional).

# 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

Public Instance Methods

after_parse() click to toggle source
# File lib/mexico/file_system/design.rb, line 70
def after_parse
  design_components.each do |dc|
    dc.design = self
  end
end
trials() click to toggle source

Returns a collection of trials that are associated with this design. @return [Array<Trial>] an array of trials associated with this design.

# File lib/mexico/file_system/design.rb, line 65
def trials
  @corpus.trials.select{ |i| i.design === self }
end