diva 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/diva/type.rb +4 -1
- data/lib/diva/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2929c06c06248e820556866e691d09ca8b17701c
|
4
|
+
data.tar.gz: df318101c0fc97e58705d17f8f996e9dac248216
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce219d41da367da84d92c36fdd312ede04a7f302bdaa9a48f1446546e006c9146ed753f3ff91fc2aed845381c36c626a8dc50bf49850315914fb7e15d7e2bb37
|
7
|
+
data.tar.gz: 7274106f32830aaaacb8365b63ebd8f9de4e60b7afce1f0107173cd9fb347324fbfd2338f3ae43072d6b3fdbc616829257ec223c6cc1219936da02e11c956ce1
|
data/lib/diva/type.rb
CHANGED
@@ -155,6 +155,7 @@ module Diva::Type
|
|
155
155
|
|
156
156
|
class ArrayType < MetaType
|
157
157
|
def initialize(type)
|
158
|
+
type = Diva::Type(type)
|
158
159
|
super("#{type.name}_array")
|
159
160
|
@type = type
|
160
161
|
end
|
@@ -207,10 +208,12 @@ module Diva
|
|
207
208
|
Diva::Type::TIME
|
208
209
|
when :uri
|
209
210
|
Diva::Type::URI
|
210
|
-
when ->x{x.
|
211
|
+
when ->x{x.class == Class && x.ancestors.include?(Diva::Model) }
|
211
212
|
Diva::Type.model_of(type)
|
212
213
|
when Array
|
213
214
|
Diva::Type.array_of(type.first)
|
215
|
+
else
|
216
|
+
fail "Invalid type #{type.inspect} (#{type.class})."
|
214
217
|
end
|
215
218
|
end
|
216
219
|
end
|
data/lib/diva/version.rb
CHANGED