# File lib/moped/uri.rb, line 176 def to_hash config = { database: database, hosts: hosts } if username && password config.merge!(username: username, password: password) end config end