toji 2.8.0 → 2.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toji/product.rb +2 -2
- data/lib/toji/product/rice_event.rb +5 -3
- data/lib/toji/product/rice_event_group.rb +3 -1
- data/lib/toji/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 786352136e52ef48ba44bb1253fb98ae7fe34e95e39dfd7985d99650f6709efc
|
4
|
+
data.tar.gz: f72942871941be4816c3f0b600d77fa27414e3a1b01b5322281690adf44760a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4d8c7fa4e01ec62c93f790d1c46eb64013909940e22c7148f6019da6708481ec5565f0f5532da05e73fa5dcae7905e24eead3ef4c80d53ce55e58ef94882d2f
|
7
|
+
data.tar.gz: 5bba69d7f5948009a2ff06c739742766efac76e79c91f3e17946c5a22eca9005b1104752842ce47a16adc4275cf44b12c0a1734a410ce0c066a35d64ca758747
|
data/lib/toji/product.rb
CHANGED
@@ -31,7 +31,7 @@ module Toji
|
|
31
31
|
koji_dates.map.with_index {|date,i|
|
32
32
|
RiceEvent.new(
|
33
33
|
product: self,
|
34
|
-
|
34
|
+
rice_type: :koji,
|
35
35
|
index: i,
|
36
36
|
group_index: koji_dates.find_index(date),
|
37
37
|
date: date,
|
@@ -44,7 +44,7 @@ module Toji
|
|
44
44
|
kake_dates.map.with_index {|date,i|
|
45
45
|
RiceEvent.new(
|
46
46
|
product: self,
|
47
|
-
|
47
|
+
rice_type: :kake,
|
48
48
|
index: i,
|
49
49
|
group_index: kake_dates.find_index(date),
|
50
50
|
date: date,
|
@@ -4,13 +4,15 @@ module Toji
|
|
4
4
|
module Product
|
5
5
|
class RiceEvent < Event
|
6
6
|
attr_reader :product
|
7
|
+
attr_reader :rice_type
|
7
8
|
attr_reader :index
|
8
9
|
attr_reader :group_index
|
9
10
|
attr_reader :weight
|
10
11
|
|
11
|
-
def initialize(product:,
|
12
|
-
super(date,
|
12
|
+
def initialize(product:, rice_type:, index:, group_index:, date:, weight:)
|
13
|
+
super(date, :rice)
|
13
14
|
@product = product
|
15
|
+
@rice_type = rice_type
|
14
16
|
@index = index
|
15
17
|
@group_index = group_index
|
16
18
|
@weight = weight
|
@@ -19,7 +21,7 @@ module Toji
|
|
19
21
|
def group_key
|
20
22
|
a = []
|
21
23
|
a << product.reduce_key
|
22
|
-
a <<
|
24
|
+
a << rice_type
|
23
25
|
a << group_index
|
24
26
|
a.map(&:to_s).join(":")
|
25
27
|
end
|
@@ -3,11 +3,13 @@ require 'toji/product/event'
|
|
3
3
|
module Toji
|
4
4
|
module Product
|
5
5
|
class RiceEventGroup < Event
|
6
|
+
attr_reader :rice_type
|
6
7
|
attr_reader :breakdown
|
7
8
|
|
8
9
|
def initialize(events)
|
9
10
|
o = events.first
|
10
|
-
super(o&.date,
|
11
|
+
super(o&.date, :rice)
|
12
|
+
@rice_type = o&.rice_type
|
11
13
|
@breakdown = events
|
12
14
|
end
|
13
15
|
|
data/lib/toji/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshida Tetsuya
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.0.4
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: Management tools for brewing japanese sake.
|