freight_kit 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/freight_kit/package.rb +2 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db75be061bb4a5ea370a39516c15719775134780b678b34834f3bfdce89cd717
|
4
|
+
data.tar.gz: 6ffe9917eaf66d4afb75233cdc115dca3c7df8359773a3de4c0dee064d9be2a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdea67fbbf39f6e7e03ec0a4b83d458778b4da637f3fa7bc62372672ace4f8322f66fe06db5f8e54690fb0d38a7d083767aa3958b7995aea770ef119d83b0449
|
7
|
+
data.tar.gz: cadbf46ccb834e9862ae6e0d52f6e31a25da916d268dad764f641416f92cf178c3abc1cd63ba19650a040800f415bb359819ef1c31494525122e5a79c310bef9
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.11
|
data/lib/freight_kit/package.rb
CHANGED
@@ -39,17 +39,14 @@ module FreightKit # :nodoc:
|
|
39
39
|
raise ArgumentError, 'Package#new: packaging_type is required' unless packaging_type
|
40
40
|
raise ArgumentError, 'Package#new: quantity is required' unless options[:quantity]
|
41
41
|
|
42
|
-
@dimensions =
|
43
|
-
when Array
|
44
|
-
dimensions.map(&:presence)
|
45
|
-
when Hash
|
42
|
+
@dimensions = if dimensions.is_a?(Hash)
|
46
43
|
[
|
47
44
|
dimensions[:height].presence,
|
48
45
|
dimensions[:width].presence,
|
49
46
|
dimensions[:length].presence,
|
50
47
|
]
|
51
48
|
else
|
52
|
-
|
49
|
+
dimensions
|
53
50
|
end
|
54
51
|
|
55
52
|
@description = options[:description]
|