grom 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grom/node.rb +12 -3
- data/lib/grom/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: e42098bf2ed1aef6acd1e537b186f64fe1d10acb
|
4
|
+
data.tar.gz: 77665761dba4a869c2e3dd2277c35add4ae1f34d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63e0fce560ecae5cf8aff919ace24f765ab0d3713742c1d412eaf10e441fc1dc05a0562d9b3d42616ee5a0e5d00c90b9066d27941e57369d93147de88b323ef3
|
7
|
+
data.tar.gz: d66051ca6c9181703153ead23ea5dd5002678f81d0072b41669a8234993067b7be3b74171dbb2cdeb3a7ce5abcbfd0ebc447ff721f4a767c42bfb002b05d7543
|
data/lib/grom/node.rb
CHANGED
@@ -81,9 +81,18 @@ module Grom
|
|
81
81
|
def populate
|
82
82
|
set_graph_id
|
83
83
|
@statements.each do |statement|
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
predicate = Grom::Helper.get_id(statement.predicate).to_sym
|
85
|
+
object = statement.object.to_s
|
86
|
+
|
87
|
+
instance_variable = instance_variable_get("@#{predicate}")
|
88
|
+
|
89
|
+
if instance_variable
|
90
|
+
instance_variable = instance_variable.is_a?(Array) ? instance_variable.flatten : [instance_variable]
|
91
|
+
instance_variable << object
|
92
|
+
instance_variable_set("@#{predicate}", instance_variable)
|
93
|
+
else
|
94
|
+
instance_variable_set("@#{predicate}", object)
|
95
|
+
end
|
87
96
|
end
|
88
97
|
end
|
89
98
|
end
|
data/lib/grom/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rebecca Appleyard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-06-
|
13
|
+
date: 2017-06-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdf
|