mumukit-randomizer 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/randomizations/range.rb +3 -1
- data/lib/mumukit/randomizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e93122f713ba49c9b158ce97cd16d1f7c8bdc0d8625f0db2c77e466b0516a98c
|
4
|
+
data.tar.gz: 3f9cb16111ec473e70573646add6039b99da3c1b110fbacd584cb7b6825c2b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07d7b2c6ef4e30255e9a908c06b4aa3e40a09067e79b6a3f34c070803ecd6922880598d58dbd93352914f86c6ca4e9a0a222c7891078cde9a6202eb1f13c0fa7
|
7
|
+
data.tar.gz: 749247a7c4ab9a09585310cb9aa8edc72e05a94441162e4a22f3c7b32616fa6f3161930b437cb15bb692593755359998b0ba6eb74059d23d3d989038b5450eeb
|
@@ -1,9 +1,11 @@
|
|
1
1
|
class Mumukit::Randomizer::Randomization::Range < Mumukit::Randomizer::Randomization::Base
|
2
2
|
def initialize(lower_bound, upper_bound)
|
3
|
+
raise 'lower bound must be Numeric' unless lower_bound.is_a?(Numeric)
|
4
|
+
raise 'upper bound must be Numeric' unless upper_bound.is_a?(Numeric)
|
3
5
|
@choices = Range.new lower_bound, upper_bound
|
4
6
|
end
|
5
7
|
|
6
8
|
def get(value)
|
7
|
-
modulo(value, choices
|
9
|
+
modulo(value, choices)
|
8
10
|
end
|
9
11
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-randomizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julián Berbel Alt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|