evt-schema 2.2.7.2 → 2.2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schema/schema.rb +14 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94736ae92e68e59dfefff646d9badab3e2cfaca3473e73ca63a9f89a955642df
|
4
|
+
data.tar.gz: 493fb2b4ead8fb99964f5af02b153f8e4d0c59184fd2bd62799165817c627ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d51cd1ee0d54afba9729353363db0a3dc19c70c88b641dea84a34c68c16664e2ddf8b82189c4aa3c2a53961733f39931c45eca8d65d4541b469a9ffe7e04fd6
|
7
|
+
data.tar.gz: ac1509e0206ea9b2ba30721101cf0d6dc9010b5978f9c85f17fc17e2220bcd697f8c02d0bbbfae41123545a54f4bb55e0178b41362f333c6eecc1dc9fee68df8
|
data/lib/schema/schema.rb
CHANGED
@@ -161,22 +161,27 @@ module Schema
|
|
161
161
|
end
|
162
162
|
end
|
163
163
|
|
164
|
-
def attributes
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
end
|
164
|
+
def attributes(include_transient: nil)
|
165
|
+
include_transient ||= false
|
166
|
+
|
167
|
+
attribute_names = self.class.attribute_names(include_transient: include_transient)
|
169
168
|
|
170
|
-
data =
|
171
|
-
|
172
|
-
attributes[attribute.name] = public_send(attribute.name)
|
169
|
+
data = attribute_names.each_with_object({}) do |attribute_name, attributes|
|
170
|
+
attributes[attribute_name] = public_send(attribute_name)
|
173
171
|
end
|
174
172
|
|
175
173
|
transform_write(data)
|
176
174
|
|
177
175
|
data
|
178
176
|
end
|
179
|
-
|
177
|
+
|
178
|
+
def to_h
|
179
|
+
attributes
|
180
|
+
end
|
181
|
+
|
182
|
+
def all_attributes
|
183
|
+
attributes(include_transient: true)
|
184
|
+
end
|
180
185
|
|
181
186
|
def ==(other, attributes_names=nil, ignore_class: nil)
|
182
187
|
comparison = Compare.(self, other, attributes_names)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-attribute
|