You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This class represents OpenSHAPA variables (columns) in Ruby. Each variable has an array called cells that contains cells in RCell format. The basic way to access these cells is to loop over them, for example:
# First get the variable from the OpenSHAPA # database and load it into a Ruby object called varvar=getVariable("trial")# Now we loop over all of the cellsforcellinvar.cells# puts is a simple command for printing whatever # comes after it to the consoleputsvar.ordinalend
will print out the ordinal of each cell. Not super exciting, but it shows how easy it is to loop over each cell.
Properties
The RVariable class stores several properties that the user can access.
cells
The cells list is what stores the RCell instances that this variable contains. This is the most important attribute of the RVariable class.
arglist
arglist stores a list of all of the matrix arguments for this variable. This is mostly used internally, but is exposed for users to access in case they need to loop over all of the arguments in a variable.
db_var
The actual Variable class from Java that is stored in this variable. This is nil if this is a new variable.