snake_camel 0.2.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32820f3ef8424e3bcb1dffba4bf3ca74b6bb3891
4
- data.tar.gz: d4b0c301dba4f285e3ad1b966bce72ef94c0fcd3
3
+ metadata.gz: 31c620ba5acdb1165247d486517d21ba8a4002a6
4
+ data.tar.gz: f35f25b38e1adc6da865b0a4898af854a8373ef3
5
5
  SHA512:
6
- metadata.gz: b385f265a64c424aaca345c4d20915d00c508fd7a5cc26c0e1bafd2b138f214b6c32327fd1f61a3647fe3fe4af277beeae1c5c70ad0cde0e26b3519835b28342
7
- data.tar.gz: 19e801d967c5a243d0867dc8baaa2c868af8dcf5e234588af19064aecda069ec53e01002e91d49028f9d259b6ad6bf4b64978251269ea9334184a0a72f4e1bdf
6
+ metadata.gz: e3a908bdb57725bd140e6d21bbd5cc362cf769de4d610844704af5a80a5e0c35e578cbae04260bd8c123764042c7bb8bed7cccb0da0d6e3afda199abbaf76899
7
+ data.tar.gz: b12bba3871b5cb86d4b10b6acd0fc908528c4bb46b20646bedd89afdab1fa1f6d0f3bfadd337621ba51e3fd46040a37b80038ff5b18c30b39865ee9e6eaebcd8
data/.gitignore CHANGED
@@ -9,4 +9,5 @@
9
9
  /tmp/
10
10
  /.DS_Store/
11
11
  /*.gem/
12
-
12
+ /*.gemspec
13
+ /*.idea
@@ -19,5 +19,9 @@ module SnakeCamel
19
19
  SnakeCamel::Methods.camelcase!(self)
20
20
  end
21
21
 
22
+ def constant_name
23
+ SnakeCamel::Methods.constant_name(self)
24
+ end
25
+
22
26
  end
23
27
  end
@@ -1,4 +1,3 @@
1
-
2
1
  module SnakeCamel
3
2
  module Methods
4
3
  extend self
@@ -19,5 +18,9 @@ module SnakeCamel
19
18
  string.replace(camelcase(string))
20
19
  end
21
20
 
21
+ def constant_name(string)
22
+ string.split(File::Separator).map { |part| camelcase(part) }.join('::')
23
+ end
24
+
22
25
  end
23
- end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module SnakeCamel
2
- VERSION = "0.2.1"
2
+ VERSION = "1.0.1"
3
3
  end
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: 0.2.1
4
+ version: 1.0.1
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-02 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.5.1
98
+ rubygems_version: 2.2.2
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: conversation between CamelCase and snake_case