h20 0.0.3 → 0.0.4
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/h20.gemspec +2 -1
- data/lib/h20.rb +3 -3
- data/lib/h20/version.rb +1 -1
- metadata +5 -4
data/h20.gemspec
CHANGED
@@ -8,9 +8,10 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = H20::VERSION
|
9
9
|
gem.authors = ["Jalendra Bhanarkar"]
|
10
10
|
gem.email = ["jbmyid@gmail.com"]
|
11
|
-
gem.description = "
|
11
|
+
gem.description = "Helpful while handelling with api in json and hash format"
|
12
12
|
gem.summary = "Converts hash to objects"
|
13
13
|
gem.homepage = "https://github.com/jbmyid/h2o"
|
14
|
+
gem.license = 'MIT'
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/lib/h20.rb
CHANGED
@@ -21,8 +21,8 @@ module H20
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def method_missing(m)
|
24
|
-
if @attributes.map{|k,v| k}.include?(m)
|
25
|
-
value = @attributes[m]
|
24
|
+
if @attributes.map{|k,v| k}.include?(m) || @attributes.map{|k,v| k}.include?(m.to_s)
|
25
|
+
value = @attributes[m] || @attributes[m.to_s]
|
26
26
|
r_value = nil
|
27
27
|
if value.kind_of?(Hash)
|
28
28
|
r_value = H2o.new(value)
|
@@ -36,5 +36,5 @@ module H20
|
|
36
36
|
super
|
37
37
|
end
|
38
38
|
end
|
39
|
-
end
|
39
|
+
end
|
40
40
|
end
|
data/lib/h20/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h20
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: 1.5.3
|
46
|
-
description:
|
46
|
+
description: Helpful while handelling with api in json and hash format
|
47
47
|
email:
|
48
48
|
- jbmyid@gmail.com
|
49
49
|
executables: []
|
@@ -59,7 +59,8 @@ files:
|
|
59
59
|
- lib/h20.rb
|
60
60
|
- lib/h20/version.rb
|
61
61
|
homepage: https://github.com/jbmyid/h2o
|
62
|
-
licenses:
|
62
|
+
licenses:
|
63
|
+
- MIT
|
63
64
|
post_install_message:
|
64
65
|
rdoc_options: []
|
65
66
|
require_paths:
|