frnames 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/frnames/caser.rb +2 -2
- 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: 226422f35ce691fdbd592e5f1dc14eea99fa8058
|
4
|
+
data.tar.gz: ed860670c20ddc9098484e241e4b1b7c5fb585ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706f8f4862063a4a3242e9a578bb056bf9b76931fdf26ce1b74fe34f5bff1ee6b6a9d2e086a6934b6af9785cf214b61d0a6e5d7f5094b8fed128a007f1f13cfb
|
7
|
+
data.tar.gz: 859b5b420b0499b6c524c78c8bbc685c75e2e0bd539fbfb79830ea7c936587fb78cc4667ceb48b4839d62b5bbe3fac21e685f39dd2a4ecd3511a39653a17815b
|
data/lib/frnames/caser.rb
CHANGED
@@ -4,7 +4,7 @@ module StringHelper
|
|
4
4
|
|
5
5
|
# == Returns
|
6
6
|
# Good and valid french town name
|
7
|
-
def
|
7
|
+
def frnamesup
|
8
8
|
town = self
|
9
9
|
#remove non chars
|
10
10
|
town.gsub!(/[^[[:alpha:]]']+/, '-')
|
@@ -15,7 +15,7 @@ module StringHelper
|
|
15
15
|
#EXCEPTION LE MANS
|
16
16
|
return "Le Mans" if town == "Le-Mans"
|
17
17
|
#Remove preposition
|
18
|
-
town.gsub(/\A(Le|La|Les|L'|De|Des|D') */, '')
|
18
|
+
town.gsub!(/\A(Le|La|Les|L\'|De|Des|D\') */, '')
|
19
19
|
#replace the A, En, ...
|
20
20
|
town.gsub!('Le-', 'le-')
|
21
21
|
town.gsub!('La-', 'la-')
|