attrio 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/attrio/types/array.rb +2 -1
- data/lib/attrio/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: 985c988564ba5cca6a41f17e2cfc280b538a2c42
|
4
|
+
data.tar.gz: fd129f77df647aba00e7ec1925a2f2a78f12c3dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96f4056d4239a873183dac22992f8ac0a364ce30d73d68a375a542663af961a647a5464bd5207b283363ade6b5dfcf5c49b863af3b3d3e6f2bea39a4e44e45a8
|
7
|
+
data.tar.gz: 2be78234462d056685caa1f444d9504b99899b8ebfab417111c9fdf6bdbcd71bc43e9035f9f335ca45d1a48b1628cfe51f9bb6dc153f031013b3c0344524d877
|
data/README.md
CHANGED
data/lib/attrio/types/array.rb
CHANGED
@@ -5,8 +5,9 @@ module Attrio
|
|
5
5
|
class Array < Base
|
6
6
|
def self.typecast(value, options = {})
|
7
7
|
begin
|
8
|
-
array = (!value.is_a?(Array) && value.respond_to?(:split)) ? value.split(options[:split])
|
8
|
+
array = (!value.is_a?(::Array) && value.respond_to?(:split)) ? value.split(options[:split]): Attrio::Helpers.to_a(value).flatten
|
9
9
|
if options[:element].present?
|
10
|
+
|
10
11
|
type = Attrio::AttributesParser.cast_type(self.element_type(options[:element]))
|
11
12
|
options = self.element_options(options[:element])
|
12
13
|
|
data/lib/attrio/version.rb
CHANGED