ordrin 0.1.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ require 'digest'
2
+
3
+ module Ordrin
4
+ module Mutate
5
+ module_function
6
+
7
+ def sha256(value)
8
+ Digest::SHA256.new.hexdigest(value)
9
+ end
10
+
11
+ def state(value)
12
+ value.upcase
13
+ end
14
+
15
+ def phone(value)
16
+ value.gsub(/\D/, '').gsub(/^(\d{3})(\d{3})(\d{4})$/, '\1-\2-\3');
17
+ end
18
+
19
+ def identity(value)
20
+ value
21
+ end
22
+ end
23
+ end
24
+