poodle 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -1
- data/lib/poodle/blood.rb +1 -1
- data/lib/poodle/version.rb +1 -1
- data/poodle.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a44516c255d6a096d8bdd899a76a1e38630af6e
|
4
|
+
data.tar.gz: d7c36e9301149525631513e1291b06107eb0db1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7dc658b3bead855d2911b9f95c0c572ccb4558cfa0cd6db73ad0c6f3b9f995a26c84b6b3a0fb3d93b9aa366e102373012d7c8e65a2958104f631dcb0014c921
|
7
|
+
data.tar.gz: 75e28bceb6867fed50278c6e6dc8745cc863fdab94f66816b34beb6cd6c02ef0b446a3dc8ea5a3496b239fb09eaaefb65d63917501e333119f923a89e42fe2c8
|
data/README.md
CHANGED
@@ -22,7 +22,33 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
It gives you a combination of a pair of blood types given by using symbols. The symbols `:a`,`:b`,`:o` and `:ab` are available for blood types. If the `genotype` option is `true` (`false` by default), it returns an array of values in genotype format (`phenotype` by default).
|
26
|
+
|
27
|
+
```Ruby
|
28
|
+
require 'poodle'
|
29
|
+
|
30
|
+
# By default, it returns an array of values described by the term "phenotype".
|
31
|
+
poodle = Poodle.new(:a, :b)
|
32
|
+
poodle.inherit
|
33
|
+
#=> ["AB", "A", "B", "O"]
|
34
|
+
|
35
|
+
# If the 'genotype' option is true,
|
36
|
+
# it returns an array of values described by the term "genotype".
|
37
|
+
poodle = Poodle.new(:a, :b, genotype: true)
|
38
|
+
poodle.inherit
|
39
|
+
#=> ["AB", "AO", "BO", "OO"]
|
40
|
+
|
41
|
+
# The 'inherit_with_rate' method returns a hash,
|
42
|
+
# a key/value pair of blood type and its probability.
|
43
|
+
poodle = Poodle.new(:a, :b)
|
44
|
+
poodle.inherit_with_rate
|
45
|
+
#=> {"AB"=>0.5625, "A"=>0.1875, "B"=>0.1875, "O"=>0.0625}
|
46
|
+
|
47
|
+
# It returns a collection of blood types in genetype.
|
48
|
+
poodle = Poodle.new(:a, :b, genotype: true)
|
49
|
+
poodle.inherit_with_rate
|
50
|
+
#=> {"AB"=>0.5625, "AO"=>0.1875, "BO"=>0.1875, "OO"=>0.0625}
|
51
|
+
```
|
26
52
|
|
27
53
|
## Contributing
|
28
54
|
|
data/lib/poodle/blood.rb
CHANGED
data/lib/poodle/version.rb
CHANGED
data/poodle.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["azukiwasher@higanworks.com"]
|
11
11
|
spec.summary = %q{A Ruby interface to ABO blood group system.}
|
12
12
|
spec.description = %q{A Ruby interface to ABO blood group system.}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "http://github.com/azukiwasher/poodle"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poodle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azukiwasher
|
@@ -74,7 +74,7 @@ files:
|
|
74
74
|
- poodle.gemspec
|
75
75
|
- spec/poodle_spec.rb
|
76
76
|
- spec/spec_helper.rb
|
77
|
-
homepage:
|
77
|
+
homepage: http://github.com/azukiwasher/poodle
|
78
78
|
licenses:
|
79
79
|
- MIT
|
80
80
|
metadata: {}
|