unswear 1.5 → 1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/unswear.rb +22 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77360b4923d34914a158a3e77910836d37f988ec
|
4
|
+
data.tar.gz: 22e3efa848d5ab298ea88c9151576b751bac4273
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b4d33618583ce9b59f1806b55ab89b26270c198ac03c75ab72a5538bacddc65dc8de871b44c7e6ffef4b5a77f95ecbb2883d2fdbc32d08662375f1c32761ec3
|
7
|
+
data.tar.gz: aa9f62ba71f92bea4cee6681a207d6fc7ab9bca95fd340d5806cf41616377ef9d4857c954c5f4633492b3136f18d81c26ddf007ffae0deed974ae85ee132be9b
|
data/lib/unswear.rb
CHANGED
@@ -1,21 +1,28 @@
|
|
1
1
|
class Unswear
|
2
2
|
def self.censor(input)
|
3
3
|
new = input
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
new.
|
12
|
-
|
13
|
-
new.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
4
|
+
|
5
|
+
curses = [
|
6
|
+
"fuck", "nigger", "nigga", "cunt", "shit",
|
7
|
+
"ass", "bitch", "piss", "dick", "pussy",
|
8
|
+
"bastard", "fag", "cock", "slut"
|
9
|
+
]
|
10
|
+
|
11
|
+
new = new.split " "
|
12
|
+
# do some magic
|
13
|
+
new.count.times do |i|
|
14
|
+
curses.count.times do |c|
|
15
|
+
if new[i] == curses[c]
|
16
|
+
new[i].gsub! "a", "*"
|
17
|
+
new[i].gsub! "e", "*"
|
18
|
+
new[i].gsub! "i", "*"
|
19
|
+
new[i].gsub! "o", "*"
|
20
|
+
new[i].gsub! "u", "*"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
new.join(",")
|
18
25
|
#finally return new
|
19
|
-
new
|
26
|
+
puts new
|
20
27
|
end
|
21
28
|
end
|