string_plus 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/string_plus.rb +2 -2
- data/lib/string_plus/version.rb +1 -1
- 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: 6b08de2b86286d2a49044572329cfd673f7a7c9f
|
4
|
+
data.tar.gz: 47a48d63da4fc0db26bdb235aecee1fbec84935b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0bb9fb481899e423de415683bf37395e41030a0dfa67e5b1035936a48f49ee346312ea6ce9350af6d364dfe1c81e8dbbed87288a5879a05adaa34c1d7fdc259
|
7
|
+
data.tar.gz: 2499122f0835950d69f163516ca9506cc5aac0ba521c5cc864b0bdca1fbc5484d17ae8b11675ffc9c6ffee23f32978eaa80c3f65850ef6cf4ab7f9954c7c3cc3
|
data/lib/string_plus.rb
CHANGED
@@ -18,7 +18,7 @@ module StringPlus
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def lcamelcase(str=self)
|
21
|
-
camelcase(false)
|
21
|
+
camelcase(str, false)
|
22
22
|
end
|
23
23
|
|
24
24
|
def underscore(str=self)
|
@@ -33,7 +33,7 @@ module StringPlus
|
|
33
33
|
alias :snakecase :underscore
|
34
34
|
|
35
35
|
def constantize(str=self)
|
36
|
-
c = str.split("-").map(
|
36
|
+
c = str.split("-").map {|segment| camelcase(segment)}.join("::")
|
37
37
|
Object.send(:const_get, c)
|
38
38
|
end
|
39
39
|
end
|
data/lib/string_plus/version.rb
CHANGED