User Guide
Ruby Component
We have added overrides of the standard comparison operators to the RubyEditConnector class which means that as well as comparing
with integer values in the event method you can also compare directly with a string.
The previous example showed how it can be used to compare with an integer. Comparing with a string (if you have a label for the
connector) is just the same:
Comparison will work in case statements too. You can also use any of the inequality operators. Mathematical operations can also be
performed on the RubyEditConnector object and return an integer result.
If you need to you can access the individual index or name of a RubyEditConnector object using the index and name methods.
Effect on Code Execution
If you supply an event method then any code you define outside of the method will no longer execute when an input changes. The example
below shows an event method which simply outputs the most recent value received.
Prior to adding this method the remaining code would have executed whenever any of the inputs changed thus resulting in the sum of the
inputs being sent to the output. However, with the event method in place FlowBotics Studio executes this method instead and ignores any
other code.
108 of 212