fish 0.0.1 → 0.0.2

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: b877d75ce88e3197de5a0c4ccc2e07c907a56727
4
- data.tar.gz: b88a63b10ee1e7b96ce3048ba482e39e17188f9a
3
+ metadata.gz: e554ff7edea97e52629ae166a26c20805fb8204a
4
+ data.tar.gz: 7ed3c27018396cd74e8e60ad6bf9dbe31480a427
5
5
  SHA512:
6
- metadata.gz: cb3f90b6ca2fb24f117f1761a63d959c3f18d30792a3eefa37e72e804e54ae650d0a2959e2e0179bb1c74eed955e048a012b1d63dacce367d270da1daf15f313
7
- data.tar.gz: 881eafa6b2fcbd990bcd9a9453d4ac82ac25e189e65d6ea4949343061d2a7a5e0edfbaa44bf9f97cbaa34fbbff0f1581923b594e766e444611b6a5d338105f76
6
+ metadata.gz: 1e43ee548644a74ba716dfb649cf988d5135bfb7edb976e80b522941a032c82ccf62bdb0a896bd3dabdab365eb4994abe142af44d5cf7fda399aecce98512618
7
+ data.tar.gz: bc830ce65d19975b1c42d6d4058c6daeedd7c82665aee51dc599db26d8d433189a96ccc7b873eb5bdfabffe09300558b9606ee342563aa7c55b8fc1ef3041d2c
@@ -25,4 +25,10 @@ module Fish
25
25
  def self.random_fish(max_len = 10)
26
26
  fish(1 + rand(max_len), rand(2) == 1)
27
27
  end
28
+
29
+ def self.many_random_fish(num, max_len = 10)
30
+ a = []
31
+ num.times {a << random_fish(max_len)}
32
+ return a
33
+ end
28
34
  end
@@ -1,3 +1,3 @@
1
- module Fish
2
- VERSION = '0.0.1'
3
- end
1
+ module Fish
2
+ VERSION = '0.0.2'
3
+ end
@@ -27,4 +27,10 @@ describe Fish do
27
27
  it 'should generate correct random fishes' do
28
28
  Fish.is_fish?(Fish.random_fish).should == true
29
29
  end
30
+
31
+ it 'should return a fish array with random fish' do
32
+ Fish.many_random_fish(10).each do |fish|
33
+ Fish.is_fish?(fish).should == true
34
+ end
35
+ end
30
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fish
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - walru5