string_plus 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +39 -6
- data/lib/string_plus.rb +2 -1
- 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: b16284eb93cb50681c38e69d65d1feca82de961a
|
4
|
+
data.tar.gz: e76f06046520281aff0a8a829617df90228a9f28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e58cb6ec1b4bbc62d1ddf6cc78c2bf46ca4744ad86a46b59fee861dbbcfdbb35605d0242d7ca11dea3bc016215fbf06dad1894bae5f4fdc009d9a7e3a11df3b5
|
7
|
+
data.tar.gz: 7aef5df18af8895b705691843682b05887316e6344894def360e655bf3d928e5e0c3771de1e384d319e454883ad4f21062127e00460ee59437a4be2f98dbb4fc
|
data/README.md
CHANGED
@@ -1,8 +1,45 @@
|
|
1
1
|
# StringPlus
|
2
2
|
|
3
|
-
|
3
|
+
Some stuff I like on `String`s.
|
4
|
+
|
5
|
+
## Methods added
|
6
|
+
|
7
|
+
### `#camelcase`
|
8
|
+
|
9
|
+
Convert a space/underscore-separated String into camel case.
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require "string_plus"
|
13
|
+
"hello_cool_world".camelcase
|
14
|
+
# => "HelloCoolWorld"
|
15
|
+
```
|
16
|
+
|
17
|
+
### `#lcamelcase`
|
18
|
+
|
19
|
+
Convert a space/underscore-separated String into lower camel case.
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require "string_plus"
|
23
|
+
"hello_cool_world".lcamelcase
|
24
|
+
# => "helloCoolWorld"
|
25
|
+
```
|
26
|
+
|
27
|
+
|
28
|
+
### `#constantize`
|
29
|
+
|
30
|
+
Convert a string into a constant.
|
31
|
+
|
32
|
+
Acknowledgments:
|
33
|
+
|
34
|
+
* The `String` will be first camel-cased.
|
35
|
+
* You're not creating a Constant, but retrieving it. So, if it doesn't already exist, it will raise an error.
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
require "string_plus"
|
39
|
+
"basic_object".constantize
|
40
|
+
# => BasicObject
|
41
|
+
```
|
4
42
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
43
|
|
7
44
|
## Installation
|
8
45
|
|
@@ -20,10 +57,6 @@ Or install it yourself as:
|
|
20
57
|
|
21
58
|
$ gem install string_plus
|
22
59
|
|
23
|
-
## Usage
|
24
|
-
|
25
|
-
TODO: Write usage instructions here
|
26
|
-
|
27
60
|
## Development
|
28
61
|
|
29
62
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/string_plus.rb
CHANGED
data/lib/string_plus/version.rb
CHANGED