String
# File lib/dm-types/bcrypt_hash.rb, line 24 def dump(value) load(value) end
# File lib/dm-types/bcrypt_hash.rb, line 14 def load(value) unless value.nil? begin primitive?(value) ? value : BCrypt::Password.new(value) rescue BCrypt::Errors::InvalidHash BCrypt::Password.create(value, :cost => BCrypt::Engine::DEFAULT_COST) end end end
Generated with the Darkfish Rdoc Generator 2.