I am using MySQL2 Ruby Driver - but it seems a little redundant to call
result.each{ |r| puts r['name'] }
for one row of returned data. Should there be an easier way to get the mysql field I want without using each block?
each
Your result should be Mysql2::Result and that is Enumerable so that you can use first (and the rest of the positive Enumerable properties):
result
Mysql2::Result
Enumerable
first
puts result.first['name']