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
220 221 222 |
# File 'lib/GECS.rb', line 220 def data @data end |
#estMethodParms ⇒ Object
Returns the value of attribute estMethodParms
220 221 222 |
# File 'lib/GECS.rb', line 220 def estMethodParms @estMethodParms end |
#estMethods ⇒ Object
Returns the value of attribute estMethods
220 221 222 |
# File 'lib/GECS.rb', line 220 def estMethods @estMethods end |
#ests ⇒ Object
Returns the value of attribute ests
220 221 222 |
# File 'lib/GECS.rb', line 220 def ests @ests end |
#experiments ⇒ Object
Returns the value of attribute experiments
220 221 222 |
# File 'lib/GECS.rb', line 220 def experiments @experiments end |
#invTypes ⇒ Object
Returns the value of attribute invTypes
220 221 222 |
# File 'lib/GECS.rb', line 220 def invTypes @invTypes end |
#parmDefs ⇒ Object
Returns the value of attribute parmDefs
220 221 222 |
# File 'lib/GECS.rb', line 220 def parmDefs @parmDefs end |
#parms ⇒ Object
Returns the value of attribute parms
220 221 222 |
# File 'lib/GECS.rb', line 220 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.
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/GECS.rb', line 233 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
247 248 249 250 |
# File 'lib/GECS.rb', line 247 def getOrAddEstMethod(name) self.estMethods ||= Array.new getOrAdd(estMethods,name) end |
#getOrAddEstMethodParm(name) ⇒ Object
251 252 253 254 |
# File 'lib/GECS.rb', line 251 def getOrAddEstMethodParm(name) self.estMethodParms ||= Array.new getOrAdd(estMethodParms,name) end |
#getOrAddInvType(name) ⇒ Object
255 256 257 258 |
# File 'lib/GECS.rb', line 255 def getOrAddInvType(name) self.invTypes ||= Array.new getOrAdd(invTypes,name) end |
#getOrAddParm(name) ⇒ Object
243 244 245 246 |
# File 'lib/GECS.rb', line 243 def getOrAddParm(name) self.parms ||= Array.new getOrAdd(parms,name) end |
#getOrAddParmDef(parmDef) ⇒ Object
259 260 261 262 |
# File 'lib/GECS.rb', line 259 def getOrAddParmDef(parmDef) self.parmDefs ||= Array.new getOrAdd(parmDefs,parmDef) end |
#to_s ⇒ Object
227 228 229 |
# File 'lib/GECS.rb', line 227 def to_s experiments.join("\n") end |