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.
@@ -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, exact_word=false
17
- helper_have_this_words? words_to_match, exact_word do |string, word, exact_world|
18
- return false if (string !~ word.regex_me_to_search_ruby(:exact_word => exact_word, :case_insensitive => true))
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, exact_word=false
23
- helper_have_this_words? words_to_match, exact_word do |string, word, exact_world|
24
- return false if (string =~ word.regex_me_to_search_ruby(:exact_word => exact_word, :case_insensitive => true))
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, exact_word
29
+ def helper_have_this_words? words_to_match, options = {}
30
30
  for word in words_to_match
31
- yield self, word, exact_word
31
+ yield self, word, options
32
32
  end
33
33
  return true
34
34
  end
@@ -2,7 +2,7 @@ module StringUtilityBelt
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 3
5
+ PATCH = 5
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
8
8
  end
@@ -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.3"
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: 17
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 3
10
- version: 0.2.3
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-14 00:00:00 -03:00
18
+ date: 2010-09-28 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies: []
21
21