mumukit-randomizer 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee83d6d1af0083b2f474908e9b242b984492f531c3fc2b36a38633fb6fb042cd
4
- data.tar.gz: 2c8e67e56237aef5a0d7ea9111bcecc4c9ab3c09d7eb36c55b06efab4f09cf8d
3
+ metadata.gz: e93122f713ba49c9b158ce97cd16d1f7c8bdc0d8625f0db2c77e466b0516a98c
4
+ data.tar.gz: 3f9cb16111ec473e70573646add6039b99da3c1b110fbacd584cb7b6825c2b15
5
5
  SHA512:
6
- metadata.gz: d95e2e5dfd21c146481714ddea4feac7f8dc1bc9c003c32e9bc90e460d28cf01039fa4fde96414f2cbcf66d362051a5a954c1f871a19235f797acd71c4a1497c
7
- data.tar.gz: b66fc9ace487ded967261b19f1fce93f8f0e6fb68293e487b4919725cd901eff0d991f3b729d36556a6e81e55f90f81baabdeadc9a922eb7a4eb88804f376e8b
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.first..choices.last)
9
+ modulo(value, choices)
8
10
  end
9
11
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  class Randomizer
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  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.0.0
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-07-13 00:00:00.000000000 Z
12
+ date: 2018-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler