range_math 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTcxZWRjY2IwNThhMjI5MzY5OGVlZWE3YjUyOTQ1N2U1ZDIyZjJiOQ==
4
+ NTMwZmUzNjcxM2NkYjEzYjZjMGUwMzQyYmJlNWM2ZGI5NTUxN2NmMA==
5
5
  data.tar.gz: !binary |-
6
- OTRmYTdkODlmZDllMjBjNTJjYTNiMjBmNWM4MzRkNDc2Yzg5ZDg1NQ==
6
+ Y2I0YjdkNzkzNDI4YWRiNDM1ZGJiMmJkZjIyOWU1OGMzZmJjYWQ2ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MGZmZGJmNDRmNmEwMjI4NjJlYzY4YWY3OTVkYjZkN2IzNzI5ZTM0MmNkOTA3
10
- MjYwZGEwNDZlYWM2OTA3NzMyNzY5MDAyMmU1NjRkZWY1Mjc4ZjQ3MDlkNDgz
11
- NTE2NjNjZWI0NjI3OWExMDc4MmU5NTExNjY3ZGFjNjc5MzExYmM=
9
+ NzkzOWNjNmM2OGZkZTQ3ZGYyNjcyOTIwNTk3MjljNDk1OTBiYmQ1ZjY0Mjk5
10
+ ODE2YzA1MWJjNDIxZmRmNmRjOTAzOTMxY2IwNDhhZjc3MTc5NGQwNDgwY2U0
11
+ Mjk3NDMzZjBjNTk0MWZjNzJiZmU0ZWM3OTgzM2YzZjNmYWNmMDI=
12
12
  data.tar.gz: !binary |-
13
- OTY5ZGRiZTEwNjZhMzg4MzZlODJhNWRjMTlhMWFiM2VjMTdjZTMwZGMyNTc4
14
- Y2M3MzVmNDg2NWZkYzRkOWE4NzgyYTJhODI2ZDM1MDlhMGExYzM5NmYyMzU0
15
- NTljNjY1YjgyZjE0NzI0NTUwNjVkMWFkMzIyYjM4OTlhNWRiZmM=
13
+ MTZlOWFkNzgzZjNlZDg5ZGI4MjE0MzA0NjY3ZjgwOTRmNzhlYmQ3NTg0NmM5
14
+ NmY4YTU1OTVjMmM5YzliYWJiNDYzNjYwZmYxOTliMWZlYTQ0NmI1MWFmN2Fi
15
+ M2QwODY0YjQ4YTgwNDY2ZTM2ZGFmMmFmNmMxZDZkYWQ4MzBmMzY=
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/range_math.rb CHANGED
@@ -35,6 +35,10 @@ class Range
35
35
  def to_i
36
36
  (self.begin.round..self.end.round)
37
37
  end
38
+
39
+ def round places=0
40
+ (self.begin.round(places)..self.end.round(places))
41
+ end
38
42
 
39
43
  def average
40
44
  (self.begin + self.end) / 2.0
data/range_math.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "range_math"
3
- s.version = "0.6.1"
3
+ s.version = "0.7.0"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["muflax"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: range_math
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - muflax
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Y1MyUGlRZS91RjRXaEZxd3BMNURLbEtzYi9JY3hPNUIKL2RYeElGbVlVaWFv
36
36
  RzYyOWlKVGdMaTFLcXFZSXFsVG5hRUZaeG1MSmZsZjNqL0Q4Z1NxeHVVSVBh
37
37
  amk1cS93eAotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
38
- date: 2013-07-28 00:00:00.000000000 Z
38
+ date: 2013-09-08 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description: use ranges in math expression
41
41
  email: mail@muflax.com
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  version: '0'
72
72
  requirements: []
73
73
  rubyforge_project:
74
- rubygems_version: 2.0.3
74
+ rubygems_version: 2.0.6
75
75
  signing_key:
76
76
  specification_version: 4
77
77
  summary: do math on ranges
metadata.gz.sig CHANGED
Binary file