rom-mapper 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rom/mapper/version.rb +1 -1
- data/lib/rom/struct.rb +14 -12
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6caa4a1e68f6319fe78447667f5ac101afb45856
|
4
|
+
data.tar.gz: 6a4690c2aca907e101a78d170244dbb457a714c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb21053ac9000e51fbe7c6d3a5caf077b6fd90f792fbca0cf1b45b6b514f816c29f17675caf0a3dedbaeb539325ba6cdc58ed9c9c002913d61b363d20f9f620a
|
7
|
+
data.tar.gz: 9c08645178ee72d423c4d068f358a041be1edaed2757f03477776906daeaa7712c74bec4af159d5cec5bf02edd1fdb81c53025cf3e5ac9b1c5cdb3167c334154
|
data/CHANGELOG.md
CHANGED
data/lib/rom/mapper/version.rb
CHANGED
data/lib/rom/struct.rb
CHANGED
@@ -70,7 +70,16 @@ module ROM
|
|
70
70
|
#
|
71
71
|
# @api public
|
72
72
|
class Struct < Dry::Struct
|
73
|
-
MissingAttribute = Class.new(NameError)
|
73
|
+
MissingAttribute = Class.new(NameError) do
|
74
|
+
def initialize(&block)
|
75
|
+
super
|
76
|
+
@message_proc = block
|
77
|
+
end
|
78
|
+
|
79
|
+
def message
|
80
|
+
@message_proc.call
|
81
|
+
end
|
82
|
+
end
|
74
83
|
|
75
84
|
# Returns a short string representation
|
76
85
|
#
|
@@ -90,16 +99,9 @@ module ROM
|
|
90
99
|
__send__(name)
|
91
100
|
end
|
92
101
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
super
|
97
|
-
end
|
98
|
-
else
|
99
|
-
# @api private
|
100
|
-
def respond_to_missing?(*)
|
101
|
-
super
|
102
|
-
end
|
102
|
+
# @api private
|
103
|
+
def respond_to_missing?(*)
|
104
|
+
super
|
103
105
|
end
|
104
106
|
|
105
107
|
private
|
@@ -107,7 +109,7 @@ module ROM
|
|
107
109
|
def method_missing(*)
|
108
110
|
super
|
109
111
|
rescue NameError => error
|
110
|
-
raise MissingAttribute.new
|
112
|
+
raise MissingAttribute.new { "#{ error.message } (attribute not loaded?)" }
|
111
113
|
end
|
112
114
|
end
|
113
115
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-equalizer
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 0.3.1
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: dry-struct
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.3'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.3'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: transproc
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|