On Sat, Jul 31, 2010 at 5:34 PM, Dave Lilley <dglnz2 / gmail.com> wrote:

> class Dopen
> =A0def initialise

It's "initialize"

> =A0 =A0@db =3D Sequel.connect(:adapter=3D>'mysql', :host=3D>'localhost',
> :database=3D>'test', :user=3D>'dave', :password=3D>'test')
> =A0end
>
> =A0def allcust
> =A0 =A0row =3D @db["SELECT * FROM cust_data"]
> =A0 =A0puts " in all_cust #{row}"

`puts` returns nil -- this is all you need:

  def all_customers     # more ruby-ish naming :-)
    @db['SELECT * FROM customer_data']   # likewise
  end

HTH,
--=20
Hassan Schroeder ------------------------ hassan.schroeder / gmail.com
twitter: @hassan