json_hash 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/json_hash.rb +3 -1
- metadata +41 -2
- data/lib/json_hash/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ebed057dba6a503fc5a5c63c969ac4aaf6e2ba1
|
4
|
+
data.tar.gz: 3ba6962773c550645d83b1a3717fd2b2ce03f713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa4a5ab27ac5207f78b2e47ec8fdc4836577860433001e4711be91ffde381390350cdcf777ac8a2d876e1c3b092804a4b1545945471c641bd05cf41c1c3d90a2
|
7
|
+
data.tar.gz: adc00cf1c15fbd80250aef99acb9dc61cae1221c52b3a4177b504998536d9f9cfb837f5d13b2f772bbc41e19c45b45fc3bf758d91ca5ea67e0b48c2ae0b1a375
|
data/lib/json_hash.rb
CHANGED
@@ -9,6 +9,8 @@ require "uri"
|
|
9
9
|
|
10
10
|
class JSONHash
|
11
11
|
|
12
|
+
VERSION = "1.0.0"
|
13
|
+
|
12
14
|
##
|
13
15
|
# Initializer. The json parameter is a Ruby hash. Usually you would call JSON.parse to get such a hash.
|
14
16
|
# @param json [Hash] A Ruby hash, usually obtained by calling JSON.parse or HTTP GET on a .json endpoint.
|
@@ -31,7 +33,7 @@ class JSONHash
|
|
31
33
|
# @param args The arguments supplied to the method.
|
32
34
|
|
33
35
|
def method_missing(method, *args)
|
34
|
-
@json[method.to_s] || super
|
36
|
+
@json[method.to_s] || @json[method.to_sym] || super
|
35
37
|
end
|
36
38
|
|
37
39
|
##
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Brazil
|
@@ -30,6 +30,46 @@ dependencies:
|
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.8.2
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: byebug
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.5'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.5.1
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.5'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.5.1
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: yard
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.8.7
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.8.7.6
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.8.7
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 0.8.7.6
|
33
73
|
description: A simple gem that adds method-like syntactic sugar to a JSON hash.
|
34
74
|
email: nb@bitaxis.com
|
35
75
|
executables: []
|
@@ -39,7 +79,6 @@ files:
|
|
39
79
|
- LICENSE
|
40
80
|
- README.md
|
41
81
|
- lib/json_hash.rb
|
42
|
-
- lib/json_hash/version.rb
|
43
82
|
homepage: https://github.com/bitaxis/json_hash.git
|
44
83
|
licenses:
|
45
84
|
- MIT
|
data/lib/json_hash/version.rb
DELETED