monkey-patch 0.0.12 → 0.0.13
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.
- data/lib/monkey-patch/string.rb +14 -7
- metadata +1 -1
data/lib/monkey-patch/string.rb
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# -*- coding: undecided -*-
|
|
2
|
+
# -*- mode: Ruby -*-
|
|
3
|
+
|
|
4
|
+
# Copyright © 2013, Christopher Mark Gore,
|
|
2
5
|
# Soli Deo Gloria,
|
|
3
6
|
# All rights reserved.
|
|
4
7
|
#
|
|
5
|
-
#
|
|
8
|
+
# 2317 South River Road, Saint Charles, Missouri 63303 USA.
|
|
6
9
|
# Web: http://cgore.com
|
|
7
10
|
# Email: cgore@cgore.com
|
|
8
11
|
#
|
|
@@ -10,15 +13,15 @@
|
|
|
10
13
|
# modification, are permitted provided that the following conditions are met:
|
|
11
14
|
#
|
|
12
15
|
# * Redistributions of source code must retain the above copyright
|
|
13
|
-
#
|
|
16
|
+
# notice, this list of conditions and the following disclaimer.
|
|
14
17
|
#
|
|
15
18
|
# * Redistributions in binary form must reproduce the above copyright
|
|
16
|
-
#
|
|
17
|
-
#
|
|
19
|
+
# notice, this list of conditions and the following disclaimer in the
|
|
20
|
+
# documentation and/or other materials provided with the distribution.
|
|
18
21
|
#
|
|
19
22
|
# * Neither the name of Christopher Mark Gore nor the names of other
|
|
20
|
-
#
|
|
21
|
-
#
|
|
23
|
+
# contributors may be used to endorse or promote products derived from
|
|
24
|
+
# this software without specific prior written permission.
|
|
22
25
|
#
|
|
23
26
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
24
27
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
@@ -44,6 +47,10 @@ class String
|
|
|
44
47
|
.downcase
|
|
45
48
|
end
|
|
46
49
|
|
|
50
|
+
def rest
|
|
51
|
+
self[1..-1]
|
|
52
|
+
end
|
|
53
|
+
|
|
47
54
|
def valid_json?
|
|
48
55
|
JSON.parse self
|
|
49
56
|
return true
|