unswear 2.0.3 → 2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/unswear.rb +28 -22
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 531734debe0a03e32e453c9e29575a93ca988980
4
- data.tar.gz: 39c46e9082a16806e8686c3582e44a0f0b77feb4
3
+ metadata.gz: 51ae0dcba92bb8b095071a1c07accd8cf47cb60c
4
+ data.tar.gz: 668ba5fb7545aaaa8988abd614f965241e5979b0
5
5
  SHA512:
6
- metadata.gz: 4586c51b3cd6423852072ca8a2e6acf9ef7435f422800177d758a8efc7b6f33c24a8d2474ba9ed777680410c41c3b5ffa8a1092b3dc00b413ba5b93edd0845ec
7
- data.tar.gz: 500efa7efddd7ddd4abab69aa75cf453468bf04928e7dc5e427b9b96405e574af3de046f32ee34e03e7f088e108d8f267e96eb11a98c8a2a747d9d345779fe3e
6
+ metadata.gz: d8f9d31ac2625fa02a4fcb6b6b18adda3dfa58e15afb18ce6429c2b23cf0dd708c17e2f0867b4a3c205cce9ac77119e94683951f7b775e7ce6334a2767dc8c38
7
+ data.tar.gz: d0d794089285e60b93a0448bbb766fc57c164fea673b7037f1ad02ef0a7a39916e4e8ad9973d33a0fa19135c0a8bf333fec12708a5051beeb2ee0794bbf2f83a
data/lib/unswear.rb CHANGED
@@ -33,32 +33,38 @@ class Unswear
33
33
  "tard", "retard", "tit", "titfuck", "tit-fuck", "tits", "titties", "twats", "twats", "unclefucker",
34
34
  "uncle-fucker", "va-j-j", "vag", "vajayjay", "vjayjay", "wank", "wank-job", "wankjob",
35
35
  "whorebag", "whore-bag", "wetback", "wet-back", "wop"
36
-
37
36
  ]
38
37
 
39
- def self.censor(input)
40
- new = input
41
- new = new.split " "
42
- # do some magic
43
- new.count.times do |i|
44
- @curses.count.times do |c|
45
- if new[i] == @curses[c]
46
- new[i].gsub! "a", "*"
47
- new[i].gsub! "e", "*"
48
- new[i].gsub! "i", "*"
49
- new[i].gsub! "o", "*"
50
- new[i].gsub! "u", "*"
38
+ def self.censor(input)
39
+ new = input
40
+ new = new.split " "
41
+ # do some magic
42
+ new.count.times do |i|
43
+ @curses.count.times do |c|
44
+ if new[i] == @curses[c]
45
+ new[i].gsub! "a", "*"
46
+ new[i].gsub! "e", "*"
47
+ new[i].gsub! "i", "*"
48
+ new[i].gsub! "o", "*"
49
+ new[i].gsub! "u", "*"
50
+ end
51
51
  end
52
52
  end
53
+ new = new.join(",")
54
+ new.gsub! ",", " "
55
+ #finally return new
56
+ puts new
53
57
  end
54
- new = new.join(",")
55
- new.gsub! ",", " "
56
- #finally return new
57
- puts new
58
- end
59
-
60
- def self.list
61
- puts @curses.sort_by(&:downcase).uniq
62
- end
63
58
 
59
+ def self.list(x=0)
60
+ unless x != 0
61
+ puts @curses.sort_by(&:downcase).uniq
62
+ else
63
+ @curses.count.times do |m|
64
+ if @curses[m][0] == x
65
+ puts @curses[m]
66
+ end
67
+ end
68
+ end
69
+ end
64
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unswear
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: '2.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh