# File lib/couch_potato.rb, line 50
  def self.with_database(database_name)
    Thread.current[:__couch_potato_databases] ||= {}
    Thread.current[:__couch_potato_databases][database_name] = Database.new(couchrest_database_for_name(database_name)) unless Thread.current[:__couch_potato_databases][database_name]
    yield Thread.current[:__couch_potato_databases][database_name]
  end