phc_string_format 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/phc_string_format.rb +1 -1
- data/lib/phc_string_format/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: 5d24f9d993ce62fa3d49a823e0bf4fdb144be1ed
|
4
|
+
data.tar.gz: 8ba69bb49f216faa7c5638a2edc8873de8c3e123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53414162a36e30136aee3b24ca4ac37ead758ad6cdae47ee1f6b09eb845d09e7e3f23f9b5da13644e020eca668ea1c60b68b5819a6f2fa4d3513d79d7406ff17
|
7
|
+
data.tar.gz: 533806a52b408f924bba5729c1e92be490d686527f3efffdb75f79d90d215e73a791a017ac05134651db02ae6430642478c3f40d4ab9ac77bb31e3c0ad1bf078
|
data/Gemfile.lock
CHANGED
data/lib/phc_string_format.rb
CHANGED
@@ -38,7 +38,7 @@ module PhcStringFormat
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.parse_parameter_string(string)
|
41
|
-
string.split(/,/).map {|e| e.split '='}.each_with_object({}) {|e, h| k, v = e; h[k]=v}
|
41
|
+
string.split(/,/).map {|e| e.split '='}.each_with_object({}) {|e, h| k, v = e; h[k.to_sym] = (/\A-?\d+(.\d+)?\Z/.match(v) ? v.to_i : v)}
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.short_strict_encode64(bin)
|