#!/usr/bin/env ruby
#
require 'sequel'
require 'sqlite3'
require 'pry'

class MoiDb
  class Hei < Sequel::Model; end
  def initialize
    @db = Sequel.sqlite 'moi.sqlite'
  end
  def create
    @db.create_table?(:heis) do
      primary_key :id
      String :content
    end
    self.class.const_set :Hei, Class.new(Sequel::Model) {}
  end
  def add
    r = {}
    r[:content] = "paskaa paskaa"
    Hei.new(r).save
  end
end


k = MoiDb.new
k.create
k.add
binding.pry