Class: String

Inherits:
Object
  • Object
show all
Includes:
BCrypt
Defined in:
lib/mori/string.rb

Instance Method Summary collapse

Instance Method Details

#encryptObject



6
7
8
# File 'lib/mori/string.rb', line 6

def encrypt
  Password.create(self, :cost => cost)
end

#normalizeObject



9
10
11
# File 'lib/mori/string.rb', line 9

def normalize
  self.remove_whitespace.downcase
end

#remove_whitespaceObject



12
13
14
# File 'lib/mori/string.rb', line 12

def remove_whitespace
 self.gsub(/\s+/, '')
end