kujibiki 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: ed10abe94a153e07c3a12398532041904fd77142
4
- data.tar.gz: 7a62c4139e07aa83912b3301ca1dc5d9174ed860
3
+ metadata.gz: cc1b80e4107b12827cb68fab29191475df72cff4
4
+ data.tar.gz: 79d96d0bfed5e0894855001e540c9895bed350fc
5
5
  SHA512:
6
- metadata.gz: ac3d8ed93d3bfe374a9d71eee40076bd413d16bb7e93daefdd937144a6f0f79f932fa07c6539a832d5f0bc88d6f1ac0be4c43af7d6d9a151d422586b0be5e2ca
7
- data.tar.gz: 992d2f60c1a85572d51af35e53c7ec61a0df7f5229668158d84b7261b6d49fb8a448b7b7033749ae720e1997a9c3732d7a0e2feb4ebd4827d5a78372434688af
6
+ metadata.gz: 3c38987eecf30a7c776a4d47a3b77daf67e342afd0be4a3e9142578a00f26ae4e39b6d9f65600e7df6b39860eef182640dfddedc2286ba8956058d6d570e45da
7
+ data.tar.gz: fa28225731ed7113e53d9f12fca6ef6f52df4435ec97159259aadaf2cf82796376fd42e3a5cab1cef443a9b2b9f52f6a0a9493079829206cb3a8880148b6d80d
data/README.md CHANGED
@@ -21,7 +21,7 @@ Or install it yourself as:
21
21
  ## Usage
22
22
 
23
23
  ```ruby
24
- require 'Kujibiki/array'
24
+ require 'kujibiki/array'
25
25
 
26
26
  %w( GreatBlessing Blessing Curse ).sample(weight: [1, 3, 1])
27
27
  #=> "Blessing" ("Blessing" is 3 times easy to be returned than others)
@@ -17,8 +17,8 @@ class Array
17
17
  end
18
18
  end
19
19
 
20
- unless weight.select {|w| w > 0}.size >= n
21
- raise ArgumentError, "weight size must be larger than or equal to sample number(#{n})"
20
+ unless weight.select {|w| w > 0}.size >= self.size
21
+ raise ArgumentError, "weight size must be larger than or equal to sample number(#{self.size})"
22
22
  end
23
23
 
24
24
  sum = weight.inject(0.0, :+)
@@ -1,3 +1,3 @@
1
1
  module Kujibiki
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kujibiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naoki Shimizu