structure 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structure.rb +11 -0
- data/lib/structure/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de5fcd89773ec6806567c78ea7eebb3867c128c6766149b81e07d82cc4d76ab1
|
4
|
+
data.tar.gz: 198774e8e6e3d4fea14f387a2862c0d88bd60923866a84a4bbdeaf0fd7be1cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052042efbc411e8d09808f5bdfeb5d2994fd25ba45ddec8d45d06d3cc57b6dc2efd84ec840a20d601618bad494e2ba319c89a579f27e7de8f53c8d59849806be
|
7
|
+
data.tar.gz: f73e1be62de7fe8540a12f4bb47ded101cf7d7bc4971ab1dbcbbe6917754ee84a82e3cc7cfdb529fd1b1f4c07d62406caa6e7ed7ab5ab528b9f8bb061120d852
|
data/lib/structure.rb
CHANGED
@@ -61,6 +61,17 @@ module Structure
|
|
61
61
|
super
|
62
62
|
end
|
63
63
|
|
64
|
+
def marshal_dump
|
65
|
+
attributes.values
|
66
|
+
end
|
67
|
+
|
68
|
+
def marshal_load(data)
|
69
|
+
@mutex = ::Thread::Mutex.new
|
70
|
+
attribute_names.zip(data).each do |key, val|
|
71
|
+
instance_variable_set(:"@#{key}", val)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
64
75
|
private
|
65
76
|
|
66
77
|
def with_mutex(&block)
|
data/lib/structure/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hakan Ensari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -79,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
rubygems_version: 3.
|
82
|
+
rubygems_version: 3.1.2
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
|
-
summary: Lazy
|
85
|
+
summary: Lazy-parse data into attributes in a thread-safe way
|
86
86
|
test_files: []
|