I would like to use a pure ruby database (kirbybase http://www.netpromi.com/files/kirbybase_ruby_manual.html ) together with Sinatra so in ruby we would have something like this to display a record:
require 'kirbybase'
db = KirbyBase.new
cars_tbl= db.get_table(:cars)
ferrari = cars_tbl.select { |r| r.recno == 9 }
puts ferrari
or for all records
results = cars_tbl.select(:name,:race,:color,:recno).sort(+:color)
what would be the best way to integrate this with Sinatra without obfuscating the “rubysh “kirbybase syntax?
To take a leaf about of sinatra-redis‘s book, you can do something like this: