range_math 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MmY1YWY0NDY0ZDM5ODdhYWYxNWViYzJlNWY0ZDU0MWVkMDgyOWNhZQ==
5
+ data.tar.gz: !binary |-
6
+ MTNmNGZiOWUzNmI3ZTFmMzlkNzlkMzY0ZWRlOGE3NTMyOWE1MTQxYg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MzY1Zjg1YWMxNGVhMWU3NTUyMzJhNGVkODEyNjE1N2M2YmNhYWRhZWQxNDgy
10
+ YjJiYzI4OGY4MzQ1NTA2YTI5ZTk3N2ZlZDEwMmJlNGFiZjUxYzViM2U5N2Ey
11
+ NjYyYmEzODYzMGM1MDkwOTVjNWJjMGM4ZmQ1MzRmZjRlOWQxZDk=
12
+ data.tar.gz: !binary |-
13
+ Y2IwMjVlYzYxZDJiYzFkNGJkMzgyYmQyNDI1NmRiMjFkMTIxZDE3MmI2ZDQ0
14
+ ZTZiMGEyZGUxZjUzYTA4ZjBjMDNmNWE0N2UyMDZkZThiZTU3YTgxOGM4NWI4
15
+ ODcwMDQ4YzMwZmJjMmIwYjc5MDU0NmE1N2VhMDQ4YzJjZDY5ODY=
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ M�y��uQ�߯c��M �b���I�$��s����k�X���u��oj�ZJ�B?ͣ��������D\wil�,�:�k�w*ўS��O�U�Ȍ�Is���
2
+ gH\��P�t3
data/lib/range_math.rb CHANGED
@@ -32,6 +32,10 @@ class Range
32
32
  (self.begin.to_f..self.end.to_f)
33
33
  end
34
34
 
35
+ def to_i
36
+ (self.begin.to_i..self.end.to_i)
37
+ end
38
+
35
39
  def average
36
40
  (self.begin + self.end) / 2.0
37
41
  end
@@ -46,6 +50,8 @@ class Range
46
50
  end
47
51
  end
48
52
 
53
+ private
54
+
49
55
  def pair_or_num operator, other
50
56
  if other.is_a? Range
51
57
  calc_pairs operator, other
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.5.0"
3
+ s.version = "0.6.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 ADDED
Binary file
metadata CHANGED
@@ -1,15 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: range_math
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - muflax
9
8
  autorequire:
10
9
  bindir: bin
11
- cert_chain: []
12
- date: 2012-04-29 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - !binary |-
12
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURMRENDQWhTZ0F3SUJB
13
+ Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREE4TVEwd0N3WURWUVFEREFSdFlX
14
+ bHMKTVJZd0ZBWUtDWkltaVpQeUxHUUJHUllHYlhWbWJHRjRNUk13RVFZS0Na
15
+ SW1pWlB5TEdRQkdSWURZMjl0TUI0WApEVEV6TURNd05ERTFNakF6TWxvWERU
16
+ RTBNRE13TkRFMU1qQXpNbG93UERFTk1Bc0dBMVVFQXd3RWJXRnBiREVXCk1C
17
+ UUdDZ21TSm9tVDhpeGtBUmtXQm0xMVpteGhlREVUTUJFR0NnbVNKb21UOGl4
18
+ a0FSa1dBMk52YlRDQ0FTSXcKRFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURD
19
+ Q0FRb0NnZ0VCQU1Cd24rWkRsV1lmb0VldnR2b1FCS0srTkJGQQpVOWlLTjVB
20
+ YTRnNTFaamlGVXRvYXNZZVRWVXZxS21rUkRNK3RGVGpsVE5SQ010RktaeStG
21
+ Yncr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SUZJQ0FURS0tLS0tCg==
38
+ date: 2013-07-28 00:00:00.000000000 Z
13
39
  dependencies: []
14
40
  description: use ranges in math expression
15
41
  email: mail@muflax.com
@@ -28,26 +54,26 @@ files:
28
54
  - test/test_range_math.rb
29
55
  homepage: http://github.com/muflax/range_math
30
56
  licenses: []
57
+ metadata: {}
31
58
  post_install_message:
32
59
  rdoc_options: []
33
60
  require_paths:
34
61
  - lib
35
62
  required_ruby_version: !ruby/object:Gem::Requirement
36
- none: false
37
63
  requirements:
38
64
  - - ! '>='
39
65
  - !ruby/object:Gem::Version
40
66
  version: '0'
41
67
  required_rubygems_version: !ruby/object:Gem::Requirement
42
- none: false
43
68
  requirements:
44
69
  - - ! '>='
45
70
  - !ruby/object:Gem::Version
46
71
  version: '0'
47
72
  requirements: []
48
73
  rubyforge_project:
49
- rubygems_version: 1.8.15
74
+ rubygems_version: 2.0.3
50
75
  signing_key:
51
- specification_version: 3
76
+ specification_version: 4
52
77
  summary: do math on ranges
53
78
  test_files: []
79
+ has_rdoc:
metadata.gz.sig ADDED
Binary file