> I was hoping to have @@dbh to be shared by both item_data_importer and
> price_importer so I didn't have to have a ton of DB connections.  Or so
> I didn't have to have my @@config loaded into memory multiple times.
>
> If I didn't care about that, I could easily just use a single @ and it
> would be just fine.  I was just trying to be clever and more efficient
> with resources.  That and learn something new in the process.  :)

If this is the real goal, I wouldn't solve it using class variables or
class instance variables, I'd solve it using dependency injection.
Take the resources that your class depend on, and make responsibility
of other class the instantiation and handling of them to the
appropriate instances. In practice:

class Importer
    def initialize(db)
        @db = db
    end

    def import()
        raise "this is abstract"
    end
end

class ItemDataImporter < Importer
    def import()
        @db[:items].insert(:item_id => 6, :name => 'Item Name');
    end
end

# Create dependencies
db = DB.new

# Hand them out to the appropriate objects
item_data_importer = ItemDataImporter.new(db)
price_importer     = PriceImporter.new(db)

item_data_importer.import()
price_importer.import()


Hope this helps,

Jesus.