redisabel 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redisabel/extensions/string.rb +4 -3
- 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: d895b7d432bc13fba69a6dd6d39ae5920b0c19db
|
4
|
+
data.tar.gz: 25f9c6163b9efd8e5bc7aa928290d7cfd335b0bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b7667b8310ba500856babe1e4feda058f89ba106029ff283025b62a38e8e0fb1f2f90de256e8a509f02ce47959bf05a74a46258a24be6c2fdf5d6af458f1186
|
7
|
+
data.tar.gz: 1df2742c315cc5ee576dc79d1c9e51545d4c2cef1e33160425b68c80a7d874aa54789cbd73f16d640e64a7783a2fd940644baa7d47cd339341a03f279a51fd48
|
@@ -37,7 +37,8 @@ class String
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def camelize
|
40
|
-
return self.to_s.split(/_/).map(&:capitalize).join
|
40
|
+
return self.to_s.split(/_/).map(&:capitalize).join.
|
41
|
+
split(/\//).map(&:capitalize).join('::')
|
41
42
|
end
|
42
43
|
|
43
44
|
def camelize!
|
@@ -45,8 +46,8 @@ class String
|
|
45
46
|
end
|
46
47
|
|
47
48
|
def underscore
|
48
|
-
return self.to_s.split(/([A-Z]?[^A-Z]*)/).reject(&:empty?).
|
49
|
-
map(&:downcase).join('_')
|
49
|
+
return self.to_s.sub(/:+/, '/').split(/([A-Z]?[^A-Z]*)/).reject(&:empty?).
|
50
|
+
map(&:downcase).join('_').gsub(/\/_/, '/')
|
50
51
|
end
|
51
52
|
|
52
53
|
def underscore!
|