class Mexico::FileSystem::Trial
Trials model the events from reality that form the ultimate substrate of a corpus. Trials are usually numbered sequentially. A trial stands for a specific clip or segment of reality, e.g., a time span and a location in space where the events under observation occurred.
Public Class Methods
new(opts={})
click to toggle source
creates a new Trial
object. @option opts [String] :identifier The identifier of the new trial object. @option opts [String] :description The identifier of the new trial object. @option opts [String] :cue The cue for the new trial object. @option opts [Integer] :running_number The running number for the new trial object.
# File lib/mexico/file_system/trial.rb, line 70 def initialize(opts={}) # @corpus = corpus [:identifier,:name,:description,:cue,:running_number].each do |att| send("#{att}=", opts[att]) if opts.has_key?(att) end end
Public Instance Methods
linked_to_design?()
click to toggle source
# File lib/mexico/file_system/trial.rb, line 83 def linked_to_design? return design!=nil end
resources()
click to toggle source
Returns a collection of resources that are associated with this trial. @return [Array<Resource>] an array of resources associated with this trial.
# File lib/mexico/file_system/trial.rb, line 79 def resources @corpus.resources.select{ |i| i.trial === self } end