scramblr 0.2.2 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/scramblr.rb +1 -1
- metadata +3 -3
data/lib/scramblr.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
def obfuscate(phrase, buzz_words)
|
2
|
-
puts phrase.split(/
|
2
|
+
puts phrase.split(/ \s /).collect{ |word| buzz_words.include?(word) ? '*' * (word.size) : word }.join
|
3
3
|
end
|
4
4
|
|
5
5
|
def report(phrase, buzz_words)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scramblr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -42,6 +42,6 @@ rubygems_version: 1.8.10
|
|
42
42
|
signing_key:
|
43
43
|
specification_version: 3
|
44
44
|
summary: ! '["scramble words or check their counts in a string e.g. ''some bad words
|
45
|
-
are f''*** bad ***!'' using the
|
46
|
-
2} using report()"]'
|
45
|
+
are f''*** bad ***!'' using the obfuscate(''some string'', [''some'',''words''])
|
46
|
+
function or $=> { some => 1, bad => 2} using report(''some string'', [''some'',''words''])"]'
|
47
47
|
test_files: []
|