physical 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69552008d60146d8d2aff0d47ae732a1baf06d3f
4
- data.tar.gz: 4bdd77b725a51cf6aa989ddf34ca4b08fc92e5f6
3
+ metadata.gz: 646e84c9b2c88a3fe86df6eb4d4fe6ac79bc4b35
4
+ data.tar.gz: 67444fccdf92994964181fea9192ddf7d73c3dbc
5
5
  SHA512:
6
- metadata.gz: 02e59b75eab848337c424e2c941a752d3328235987f65e031330de022cd50e04b41db8f5488c31bc614a0374e10627478b87a93db2e697f6b8319e633f25372c
7
- data.tar.gz: eb257f74a3353fed64edf7579043e8dcf76a2d52b35653201841d05d091f528cbd66abd1faf4d2c5207557eb66c8e193c513aa6dbdaf47cabf30eec43b252849
6
+ metadata.gz: d95659693cf614337735a5e65c72d20a4e7dbabc3f252949f840de4d57e00d79691f4a82cc06f8667c9c4838cbd543b96025f26e1ff6e25b7467f63d092d272e
7
+ data.tar.gz: 7b9aab3e03d899a33212895ac36abc786e04766542816cf6755232d8b88863c7377e0d1ba1d0c99550eb72ce22a0c89556d866720938178667703f47062c0407
data/lib/physical/box.rb CHANGED
@@ -5,15 +5,19 @@ require 'measured'
5
5
  module Physical
6
6
  class Box < Cuboid
7
7
  DEFAULT_LENGTH = BigDecimal::INFINITY
8
+ DEFAULT_MAX_WEIGHT = BigDecimal::INFINITY
9
+
8
10
  attr_reader :inner_dimensions,
9
11
  :inner_length,
10
12
  :inner_width,
11
- :inner_height
13
+ :inner_height,
14
+ :max_weight
12
15
 
13
- def initialize(inner_dimensions: [], **args)
16
+ def initialize(inner_dimensions: [], max_weight: Measured::Weight(DEFAULT_MAX_WEIGHT, :g), **args)
14
17
  super args
15
18
  @inner_dimensions = fill_dimensions(Types::Dimensions[inner_dimensions])
16
19
  @inner_length, @inner_width, @inner_height = *@inner_dimensions
20
+ @max_weight = Types::Weight[max_weight]
17
21
  end
18
22
 
19
23
  def inner_volume
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Physical
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: physical
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-10 00:00:00.000000000 Z
11
+ date: 2019-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carmen