Method: Mongo::Auth::User#spec
- Defined in:
- lib/mongo/auth/user.rb
#spec ⇒ Hash
Get the specification for the user, used in creation.
200 201 202 203 204 205 206 |
# File 'lib/mongo/auth/user.rb', line 200 def spec {roles: roles}.tap do |spec| if password spec[:pwd] = password end end end |