matsuya 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +4 -4
- data/lib/matsuya.rb +2 -2
- data/lib/matsuya/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1b31e1b7cd54fcc41e938e9bd952e6eab4bba71
|
4
|
+
data.tar.gz: 0ef71174c54d160b8952d12fff3f5c16c34b323b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c43fd67a154c443d95f2a850fe1f1369d6106dbbb34239aeabd8da5f6953eb7e067008603a25235800e8cd45a02586ef1d01065099c259804f746da8ab86f6
|
7
|
+
data.tar.gz: dde82521d9d6b91141ed4a11fdbce54290c048b2ddb319ca912261ee72917b3967714c33a4f6a8cf84f6c65d2dd93a28e9cbb15b2a7618924cf96fb27a762a23
|
data/README.md
CHANGED
@@ -22,13 +22,13 @@ gem 'matsuya'
|
|
22
22
|
### シェルから使う
|
23
23
|
`gem install`した場合は、以下のようなコマンドを入力するとなにか出てきます。
|
24
24
|
```
|
25
|
-
%
|
25
|
+
% matsuya
|
26
26
|
牛めし
|
27
|
-
%
|
27
|
+
% matsuya
|
28
28
|
牛めし
|
29
|
-
%
|
29
|
+
% matsuya
|
30
30
|
めし
|
31
|
-
%
|
31
|
+
% matsuya
|
32
32
|
プレミアムカルビキムカル丼
|
33
33
|
%
|
34
34
|
```
|
data/lib/matsuya.rb
CHANGED
@@ -71,7 +71,7 @@ module Matsuya
|
|
71
71
|
# Matsuya::NetworkNode 再帰呼出し用。省略する。
|
72
72
|
# ==== Return
|
73
73
|
# Array 材料を並べた配列
|
74
|
-
def generate(okano: 1
|
74
|
+
def generate(okano: 0.1, current: network.find{|n|n.node == :begin})
|
75
75
|
if current.is_a? NetworkNode
|
76
76
|
nex = current.follow.sample
|
77
77
|
if nex.is_a?(NetworkNode) and rand < okano
|
@@ -129,7 +129,7 @@ module Matsuya
|
|
129
129
|
# Float おかの値。おかの値が高いと商品が変異する確率が上がる。0-1の範囲の値。
|
130
130
|
# ==== Return
|
131
131
|
# String 商品名
|
132
|
-
def order(okano=1
|
132
|
+
def order(okano=0.1) # !> shadowing outer local variable - ys2
|
133
133
|
preparation(generate.reject{|x|x==:begin}).join
|
134
134
|
end
|
135
135
|
end
|
data/lib/matsuya/version.rb
CHANGED