# File lib/couchdb_adapter/adapter.rb, line 85 def db_name result = options[:path].scan(/^\/?([-_+%()$a-z0-9]+?)\/?$/).flatten[0] if result != nil return Addressable::URI.unencode_component(result) else raise StandardError, "Invalid database path: '#{options[:path]}'" end end