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 +4 -4
- data/README.md +7 -7
- data/lib/snake_camel/methods.rb +1 -1
- data/lib/snake_camel/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32820f3ef8424e3bcb1dffba4bf3ca74b6bb3891
|
4
|
+
data.tar.gz: d4b0c301dba4f285e3ad1b966bce72ef94c0fcd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
##
|
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
|
|
data/lib/snake_camel/methods.rb
CHANGED
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: 0.2.
|
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-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|