snake_camel 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/snake_camel/instance_methods.rb +4 -0
- data/lib/snake_camel/methods.rb +5 -0
- data/lib/snake_camel/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5f12416d094b8ebaab8fc60554dc898803b9bdf
|
4
|
+
data.tar.gz: 93618a836907ec6a43b241470b3261f24dd2eb06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebe851acfb76d59f5773c799591be80592c0748ffc7a1897ac7aec3f07814eaa83e71394da33650e9f4f821fd220604829c68718f86720a20986527cb77e15dc
|
7
|
+
data.tar.gz: b17223e14b3235ec8bdd12679aaccb8cb2dbc8ee514dca1c78ee5375e0a9bbd28f438c56a88872d2a4758ae50674d8f48ef29109c001e9d96a2a71b4704a81af
|
data/README.md
CHANGED
data/lib/snake_camel/methods.rb
CHANGED
@@ -22,5 +22,10 @@ module SnakeCamel
|
|
22
22
|
string.split(File::Separator).map { |part| camelcase(part) }.join('::')
|
23
23
|
end
|
24
24
|
|
25
|
+
def path_name(camelcase_string)
|
26
|
+
return snakecase(camelcase_string).insert(0, File::Separator) unless camelcase_string.match(/::/)
|
27
|
+
camelcase_string.split("::").map { |part| snakecase(part) }.join(File::Separator)
|
28
|
+
end
|
29
|
+
|
25
30
|
end
|
26
31
|
end
|
data/lib/snake_camel/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snake_camel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Balint Bejczi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,5 +98,5 @@ rubyforge_project:
|
|
98
98
|
rubygems_version: 2.2.2
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
|
-
summary:
|
101
|
+
summary: converion between CamelCase and snake_case
|
102
102
|
test_files: []
|