string_utility_belt 0.2.3 → 0.2.5
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.
- data/lib/general/general.rb +8 -8
- data/lib/string_utility_belt/version.rb +1 -1
- data/string_utility_belt.gemspec +1 -1
- metadata +4 -4
data/lib/general/general.rb
CHANGED
@@ -13,22 +13,22 @@ module General
|
|
13
13
|
self.strip.gsub!(/\s+/, " ")
|
14
14
|
end
|
15
15
|
|
16
|
-
def have_this_words? words_to_match,
|
17
|
-
helper_have_this_words? words_to_match,
|
18
|
-
return false if (string !~ word.regex_me_to_search_ruby(:exact_word => exact_word, :case_insensitive =>
|
16
|
+
def have_this_words? words_to_match, options = {}
|
17
|
+
helper_have_this_words? words_to_match, options do |string, word, options|
|
18
|
+
return false if (string !~ word.regex_me_to_search_ruby(:exact_word => options[:exact_word], :case_insensitive => options[:case_insensitive], :latin_chars_variation => options[:latin_chars_variation]))
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
def not_have_this_words? words_to_match,
|
23
|
-
helper_have_this_words? words_to_match,
|
24
|
-
return false if (string =~ word.regex_me_to_search_ruby(:exact_word => exact_word, :case_insensitive =>
|
22
|
+
def not_have_this_words? words_to_match, options = {}
|
23
|
+
helper_have_this_words? words_to_match, options do |string, word, options|
|
24
|
+
return false if (string =~ word.regex_me_to_search_ruby(:exact_word => options[:exact_word], :case_insensitive => options[:case_insensitive], :latin_chars_variation => options[:latin_chars_variation]))
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
private
|
29
|
-
def helper_have_this_words? words_to_match,
|
29
|
+
def helper_have_this_words? words_to_match, options = {}
|
30
30
|
for word in words_to_match
|
31
|
-
yield self, word,
|
31
|
+
yield self, word, options
|
32
32
|
end
|
33
33
|
return true
|
34
34
|
end
|
data/string_utility_belt.gemspec
CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "string_utility_belt"
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.5"
|
6
6
|
s.description = "Useful methods for strings!"
|
7
7
|
s.summary = "Useful methods for strings!"
|
8
8
|
s.author = "Rodrigo Serradura"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_utility_belt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rodrigo Serradura
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-28 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|