Class: GECS::BagOfHolding
- Inherits:
-
Struct
- Object
- Struct
- GECS::BagOfHolding
- Defined in:
- lib/GECS.rb
Overview
Normative struct definition.
BagOfHolding is a bag containing everything that is loaded from or saved to an export file except for the GECS version number.
- parms
-
Array of strings defining pseudo-enum as used in a given data file. See Parms.
- estMethods
-
Array of strings defining pseudo-enum as used in a given data file. See EstMethods.
- estMethodParms
-
Array of strings defining pseudo-enum as used in a given data file. See EstMethodParms.
- invTypes
-
Array of strings defining pseudo-enum as used in a given data file. See InvTypes.
- parmDefs
-
Array of ParmDef structs defining pseudo-enum as used in a given data file.
- experiments
-
Array of Experiment structs (index by experiment id).
- data
-
Hash from Key to array (per depVars) of arrays (measurement values in chronological order).
- ests
-
Hash from Key to array (per depVars) of hashes (from parmDefs index to ParmData).
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#estMethodParms ⇒ Object
Returns the value of attribute estMethodParms.
-
#estMethods ⇒ Object
Returns the value of attribute estMethods.
-
#ests ⇒ Object
Returns the value of attribute ests.
-
#experiments ⇒ Object
Returns the value of attribute experiments.
-
#invTypes ⇒ Object
Returns the value of attribute invTypes.
-
#parmDefs ⇒ Object
Returns the value of attribute parmDefs.
-
#parms ⇒ Object
Returns the value of attribute parms.
Instance Method Summary collapse
-
#getOrAdd(array, name) ⇒ Object
Methods to retrieve or create enum values.
- #getOrAddEstMethod(name) ⇒ Object
- #getOrAddEstMethodParm(name) ⇒ Object
- #getOrAddInvType(name) ⇒ Object
- #getOrAddParm(name) ⇒ Object
- #getOrAddParmDef(parmDef) ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
227 228 229 |
# File 'lib/GECS.rb', line 227 def data @data end |
#estMethodParms ⇒ Object
Returns the value of attribute estMethodParms
227 228 229 |
# File 'lib/GECS.rb', line 227 def estMethodParms @estMethodParms end |
#estMethods ⇒ Object
Returns the value of attribute estMethods
227 228 229 |
# File 'lib/GECS.rb', line 227 def estMethods @estMethods end |
#ests ⇒ Object
Returns the value of attribute ests
227 228 229 |
# File 'lib/GECS.rb', line 227 def ests @ests end |
#experiments ⇒ Object
Returns the value of attribute experiments
227 228 229 |
# File 'lib/GECS.rb', line 227 def experiments @experiments end |
#invTypes ⇒ Object
Returns the value of attribute invTypes
227 228 229 |
# File 'lib/GECS.rb', line 227 def invTypes @invTypes end |
#parmDefs ⇒ Object
Returns the value of attribute parmDefs
227 228 229 |
# File 'lib/GECS.rb', line 227 def parmDefs @parmDefs end |
#parms ⇒ Object
Returns the value of attribute parms
227 228 229 |
# File 'lib/GECS.rb', line 227 def parms @parms end |
Instance Method Details
#getOrAdd(array, name) ⇒ Object
Methods to retrieve or create enum values. If a requested value does not already exist, it is added without fanfare.
240 241 242 243 244 245 246 247 248 249 |
# File 'lib/GECS.rb', line 240 def getOrAdd(array,name) raise "Can't add to nil" if array.nil? i = array.index(name) if i.nil? array.push(name) array.length-1 else i end end |
#getOrAddEstMethod(name) ⇒ Object
254 255 256 257 |
# File 'lib/GECS.rb', line 254 def getOrAddEstMethod(name) self.estMethods ||= Array.new getOrAdd(estMethods,name) end |
#getOrAddEstMethodParm(name) ⇒ Object
258 259 260 261 |
# File 'lib/GECS.rb', line 258 def getOrAddEstMethodParm(name) self.estMethodParms ||= Array.new getOrAdd(estMethodParms,name) end |
#getOrAddInvType(name) ⇒ Object
262 263 264 265 |
# File 'lib/GECS.rb', line 262 def getOrAddInvType(name) self.invTypes ||= Array.new getOrAdd(invTypes,name) end |
#getOrAddParm(name) ⇒ Object
250 251 252 253 |
# File 'lib/GECS.rb', line 250 def getOrAddParm(name) self.parms ||= Array.new getOrAdd(parms,name) end |
#getOrAddParmDef(parmDef) ⇒ Object
266 267 268 269 |
# File 'lib/GECS.rb', line 266 def getOrAddParmDef(parmDef) self.parmDefs ||= Array.new getOrAdd(parmDefs,parmDef) end |
#to_s ⇒ Object
234 235 236 |
# File 'lib/GECS.rb', line 234 def to_s experiments.join("\n") end |