vhx-ruby 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/vhx/utilities/vhx_object.rb +4 -4
- data/lib/vhx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14dd5f32d0d98ba5fb73c449ccd1d2577f7c168d
|
4
|
+
data.tar.gz: '075257692946be758131b7416d809b549bbdafe2'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48122f1ef7d5ee986f4ca788d9048995562e33b83d1c5a973bfc0a3934bb1fc7cc1ef83d2c1009428705bd92ce1d587d2158d370305e157d140f7410e658a575
|
7
|
+
data.tar.gz: f007e75f75c74117b83dc15ddb2672ab375cfcc9caf1f52e61b25bbe57ffb4c21c01f62232e7c45f9602f593758b4ba0872c0e3dd2e5ddc99abd483d2f69417d
|
data/README.md
CHANGED
@@ -75,12 +75,12 @@ module Vhx
|
|
75
75
|
associations = (obj_hash.fetch('_links', {}).keys | obj_hash.fetch('_embedded', {}).keys).select{|k| ASSOCIATION_WHITELIST.include?(k)}
|
76
76
|
associations.each do |association_method|
|
77
77
|
self.class.send(:define_method, association_method) do |payload = {}|
|
78
|
-
if payload.empty? && obj_hash['_embedded'] && obj_hash['_embedded'].has_key?(association_method)
|
79
|
-
return instance_variable_set("@#{association_method}", fetch_embedded_association(obj_hash, association_method))
|
78
|
+
if payload.empty? && @obj_hash['_embedded'] && @obj_hash['_embedded'].has_key?(association_method)
|
79
|
+
return instance_variable_set("@#{association_method}", fetch_embedded_association(@obj_hash, association_method))
|
80
80
|
end
|
81
81
|
|
82
|
-
if obj_hash['_links'] && obj_hash['_links'].has_key?(association_method)
|
83
|
-
return instance_variable_set("@#{association_method}", fetch_linked_association(obj_hash, association_method, payload))
|
82
|
+
if @obj_hash['_links'] && @obj_hash['_links'].has_key?(association_method)
|
83
|
+
return instance_variable_set("@#{association_method}", fetch_linked_association(@obj_hash, association_method, payload))
|
84
84
|
end
|
85
85
|
|
86
86
|
raise InvalidResourceError.new 'Association does not exist'
|
data/lib/vhx/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vhx-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sagar Shah
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
version: '0'
|
164
164
|
requirements: []
|
165
165
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.5.
|
166
|
+
rubygems_version: 2.5.2
|
167
167
|
signing_key:
|
168
168
|
specification_version: 4
|
169
169
|
summary: A Ruby wrapper for the VHX developer API.
|