snake_camel 0.2.0 → 0.2.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: 87b2c2d56313835f2cda5993ccc8053b3d47ef7d
4
- data.tar.gz: 026f016ae292ab0e6b152d936ac549d22118a0ad
3
+ metadata.gz: 32820f3ef8424e3bcb1dffba4bf3ca74b6bb3891
4
+ data.tar.gz: d4b0c301dba4f285e3ad1b966bce72ef94c0fcd3
5
5
  SHA512:
6
- metadata.gz: 3a7aaf0c91edf2b95867d62581355c8ef3e7621d47eb826f42573d4f5e5962adfa8912ef1c08592a1f48f1c817ecfbada5eb5bdc9e27619992e8ec0338ebef0a
7
- data.tar.gz: d10bfa7d94e1f59add5adb9755b70260db9da6cdd051865375ac018ca33cdb834164046df8b31d0f8e0265b4e6ec18136984d833d75e4e59d5cdf7d5573eb366
6
+ metadata.gz: b385f265a64c424aaca345c4d20915d00c508fd7a5cc26c0e1bafd2b138f214b6c32327fd1f61a3647fe3fe4af277beeae1c5c70ad0cde0e26b3519835b28342
7
+ data.tar.gz: 19e801d967c5a243d0867dc8baaa2c868af8dcf5e234588af19064aecda069ec53e01002e91d49028f9d259b6ad6bf4b64978251269ea9334184a0a72f4e1bdf
data/README.md CHANGED
@@ -19,9 +19,7 @@ Or install it yourself as:
19
19
  $ gem install snake_camel
20
20
 
21
21
 
22
- ## Usage
23
-
24
- ### Available methods:
22
+ ## Methods
25
23
 
26
24
  - snakecase
27
25
 
@@ -32,6 +30,8 @@ Or install it yourself as:
32
30
  - camelcase!
33
31
 
34
32
 
33
+ ## Usage
34
+
35
35
  You have several ways to use it, it's pretty simple. Choose one, based on your need!
36
36
 
37
37
  - If you don't care about what's under the hood:
@@ -54,23 +54,23 @@ require 'snake_camel/instance_methods'
54
54
  foo = 'FooBar'
55
55
  foo.extend SnakeCamel::InstanceMethods
56
56
 
57
- foo.snakecase #=> foo_bar
57
+ foo.snakecase #=> 'foo_bar'
58
58
 
59
59
  or
60
60
 
61
61
  foo = 'foo_bar'
62
62
  foo.extend SnakeCamel::InstanceMethods
63
63
 
64
- foo.camelcase #=> FooBar
64
+ foo.camelcase #=> 'FooBar'
65
65
  ```
66
66
  - And you can use it like a regular method:
67
67
 
68
68
  ```ruby
69
69
  require 'snake_camel/methods'
70
70
 
71
- SnakeCamel::Methods.snakecase('FooBar') #=> foo_bar
71
+ SnakeCamel::Methods.snakecase('FooBar') #=> 'foo_bar'
72
72
 
73
- SnakeCamel::Methods.camelcase('foo_bar') #=> FooBar
73
+ SnakeCamel::Methods.camelcase('foo_bar') #=> 'FooBar'
74
74
  ```
75
75
 
76
76
 
@@ -12,7 +12,7 @@ module SnakeCamel
12
12
  end
13
13
 
14
14
  def camelcase(string)
15
- string.to_s.split('_').each { |e| e.capitalize! }.join
15
+ string.to_s.split('_').map(&:capitalize).join
16
16
  end
17
17
 
18
18
  def camelcase!(string)
@@ -1,3 +1,3 @@
1
1
  module SnakeCamel
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.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.0
4
+ version: 0.2.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-04-11 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler