Changes

Ruby Methods

No change in size, 18:08, 1 February 2016
m
Text replacement - "<google>ADSDAQBOX_FLOW</google>" to "<htmlet>adsdaqbox_flow</htmlet>"
</pre>
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
In this example, the method is called multiple times, passing through arguments that are then used in the method to perform a calculation on the arguments, displaying the result. To achieve this without methods it would be necessary to repeat the code in the method 4 times over. Clearly, placing the code in a method and re-using it over and over is a much more efficient approach.