Camping with a Pure Ruby database
I would like to use a pure ruby database (kirbybase <http://www.netpromi.com/files/kirbybase_ruby_manual.html> ) together with Camping (http://camping.io the ruby microframework) 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 Camping without obfuscating the "rubysh "kirbybase syntax?
A simple module for connecting to an Sqlite (default database on camping) through active record would look like this


 module Models
    class Content < Base; end
    
    class BasicFields < V 1.0
      def self.up
        create_table Content.table_name do |t|
          t.string :title
          t.text   :text
          t.timestamps
        end
      end

      def self.down
        drop_table Content.table_name
      end      
    end 
  end   


Thanks in advance for your help !


Camping with a Pure Ruby database
===

I would like to use a pure ruby database (kirbybase <http://www.netpromi.com/files/kirbybase_ruby_manual.html> ) together with Camping (http://camping.io the ruby microframework) 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 Camping without obfuscating the "rubysh "kirbybase syntax?
A simple module for connecting to an Sqlite (default database on camping) through active record would look like this


 module Models
    class Content < Base; end
    
    class BasicFields < V 1.0
      def self.up
        create_table Content.table_name do |t|
          t.string :title
          t.text   :text
          t.timestamps
        end
      end

      def self.down
        drop_table Content.table_name
      end      
    end 
  end   


Thanks in advance for your help !

