This repository has been archived by the owner on Aug 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
RVariable
smidget edited this page Jul 19, 2012
·
3 revisions
Methods: change_arg_name, add_arg, remove_arg
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 var
var = getVariable("trial")
# Now we loop over all of the cells
for cell in var.cells
# puts is a simple command for printing whatever
# comes after it to the console
puts var.ordinal
end
will print out the ordinal of each cell. Not super exciting, but it shows how easy it is to loop over each cell.