After looking at Why unit conversion doesn't work?: it dawned on me that the Ruby console can do math…However, I get the idea that formatting will be needed. Is there a reference to how to pick this up? Note I have no skills at programing.
You basically need to follow the syntax dictated by the Ruby Programming Language.
Beside the simple math (
3*Math.sin(Math::PI/3) + 23 ) - which is not really different than, for example the functions in excel sheet - the Ruby Console can use, interpret and execute, methods, methods in Modules, Classes…etc.
(Perhaps The Automatic SketchUp could be your start to get usage of the Console. However several other regards, this book a way much outdated…)