evt-schema 1.0.1.0 → 1.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/schema/controls/data_structure.rb +4 -4
- data/lib/schema/data_structure.rb +2 -2
- data/lib/schema/schema.rb +3 -3
- 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: 6c2773f718479f4665ede37f8ed53d35a399756dc99e045b11695ba4416f9531
|
4
|
+
data.tar.gz: fc3ee8209d3ece0833c73d2b2f1e15db2d99676af0a0ef06c032486d2b71b235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1999ed98e1b9ea2ea5995aa3cac849bdd82257a79f8dd1232788907fec8d99e1dc2536f8da45fe57211017c5f0bd049fde4e02fe7702cbe0d20a073f091c2089
|
7
|
+
data.tar.gz: 13f2dcedd0da68335719094ace97f46806144604d91fe655c1d36d896b5f1614900d77c4656c50785dd6d55159198cd0e43354e807060dea4145916cfe609d9d
|
@@ -59,12 +59,12 @@ module Schema
|
|
59
59
|
end
|
60
60
|
|
61
61
|
class Example < DataStructure::Example
|
62
|
-
def
|
63
|
-
data[:some_attribute] = 'some
|
62
|
+
def read(data)
|
63
|
+
data[:some_attribute] = 'some read value'
|
64
64
|
end
|
65
65
|
|
66
|
-
def
|
67
|
-
data[:some_attribute] = 'some
|
66
|
+
def write(data)
|
67
|
+
data[:some_attribute] = 'some written value'
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
@@ -10,7 +10,7 @@ module Schema
|
|
10
10
|
virtual :configure_dependencies do
|
11
11
|
configure
|
12
12
|
end
|
13
|
-
virtual :
|
13
|
+
virtual :read
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -20,7 +20,7 @@ module Schema
|
|
20
20
|
strict ||= false
|
21
21
|
|
22
22
|
new.tap do |instance|
|
23
|
-
instance.
|
23
|
+
instance.read(data)
|
24
24
|
set_attributes(instance, data, strict)
|
25
25
|
instance.configure_dependencies
|
26
26
|
end
|
data/lib/schema/schema.rb
CHANGED
@@ -9,8 +9,8 @@ module Schema
|
|
9
9
|
# This is done as a countermeasure for incompatibility
|
10
10
|
# between Virtual and an Assertions module
|
11
11
|
# include Virtual
|
12
|
-
# virtual :
|
13
|
-
define_method(:
|
12
|
+
# virtual :write
|
13
|
+
define_method(:write) {|data|}
|
14
14
|
#
|
15
15
|
|
16
16
|
const_set(:Boolean, Boolean)
|
@@ -155,7 +155,7 @@ module Schema
|
|
155
155
|
attributes[attribute.name] = public_send(attribute.name)
|
156
156
|
end
|
157
157
|
|
158
|
-
|
158
|
+
write(data)
|
159
159
|
|
160
160
|
data
|
161
161
|
end
|
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: 1.
|
4
|
+
version: 1.1.0.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: 2019-
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-attribute
|