def main()
myDB=DB.new('myUser','myPass','myDB')
record = myDB.handle().select_one('select count(*) from things')
printf "%10d" % record
end
main() result: 30008428
I want to divide this value by 24 to create batches which will be executed every hour. This is the pretty print result:
[#<BigDecimal:ac2fdf94,'0.30008428E8',8(12)>]
I'm pretty confused on how to achieve that. As I understand it "record" is an array with a BigDecimal object in it. I tried to do record[0].div(24) that didn't work either. record.div(24) also didn't work.
Since I've spent quite a bit of time figuring it out now, I feel like I need to turn to the community for a little bit of help.
Thanks in advance.