weighable 0.10.1 → 1.0.0

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: 738914f0c2ec7192f9a3533f0472690aee4a03fc
4
- data.tar.gz: 8e1cf00aac99a482353637073b5abf004ee82848
3
+ metadata.gz: 9d2ab63e8b1b5d0294a767f2fd252d3f29b45b24
4
+ data.tar.gz: 73085f79b5364041b48a22a2675e25512a7f034c
5
5
  SHA512:
6
- metadata.gz: 8bbc61d0f965aee9e91533c80f07ada70e7c6188f407dfbb5bb4c9fc10168fedf8bfd0d1feeafca1e35112e03f0ceea7bc6adf27ff3b5de9da7edbab6aa9bf88
7
- data.tar.gz: ed3838c041512cdf5b220391908ca7ea6a776a5f307265accf517f0af8968b262527e018035a722968bd2dff986cf1d24d8365c621190d916fdfa0fc0d136773
6
+ metadata.gz: f632ed67b21ed745483a3116633c74fa1fd232cbcbf87e1a7c09a09a2ed83222b9ba61ea59f02d95fd16fbc08dd09bac8027caaa1e9b96b0a7a6bb120aaf28c7
7
+ data.tar.gz: b3189f950f3d2c680d472e5ffdfb5717a651819fc82285162a54974dd11af86ba84ba65343fdaeb1fa50b5079b0ba2bc8bc20c59d885c426d3d93f4b0c15d17f
@@ -1,3 +1,3 @@
1
1
  module Weighable
2
- VERSION = '0.10.1'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
@@ -194,8 +194,15 @@ module Weighable
194
194
  end
195
195
 
196
196
  def round(precision = 0)
197
- @value = @value.round(precision)
198
- self
197
+ Weight.new(@value.round(precision), @unit)
198
+ end
199
+
200
+ def ceil(precision = 0)
201
+ Weight.new(@value.ceil(precision), @unit)
202
+ end
203
+
204
+ def floor(precision = 0)
205
+ Weight.new(@value.floor(precision), @unit)
199
206
  end
200
207
 
201
208
  def zero?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weighable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trae Robrock
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-01 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport