toji 2.8.0 → 2.9.0

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
  SHA256:
3
- metadata.gz: 6064acd8dc9d6655025954b4f6e7af6eb2ff57a5e96b8b3bab0b1dd9840fd892
4
- data.tar.gz: 91bb99e9d7b664863773e5b1bf52e7fbb1bd0bf3961ace3b7b1d874b4963d437
3
+ metadata.gz: 786352136e52ef48ba44bb1253fb98ae7fe34e95e39dfd7985d99650f6709efc
4
+ data.tar.gz: f72942871941be4816c3f0b600d77fa27414e3a1b01b5322281690adf44760a8
5
5
  SHA512:
6
- metadata.gz: 23dbc8597c3c9e366d14e5aaf02bcca1b3512d244ae52e789ef918f392e5504f9e2acbceeb3a2174f11239dcb8966b4b6d82ac3b03df6fdaa7ed8dc7e1adbb1d
7
- data.tar.gz: bf3d505d1e0e7770d4efa74df9c67e8638eebfe622127feb854716be2c07ea268b853b84462b3f7e5920dc8892ad1b1be633633456e916a8a3c01cb6baf68be2
6
+ metadata.gz: c4d8c7fa4e01ec62c93f790d1c46eb64013909940e22c7148f6019da6708481ec5565f0f5532da05e73fa5dcae7905e24eead3ef4c80d53ce55e58ef94882d2f
7
+ data.tar.gz: 5bba69d7f5948009a2ff06c739742766efac76e79c91f3e17946c5a22eca9005b1104752842ce47a16adc4275cf44b12c0a1734a410ce0c066a35d64ca758747
@@ -31,7 +31,7 @@ module Toji
31
31
  koji_dates.map.with_index {|date,i|
32
32
  RiceEvent.new(
33
33
  product: self,
34
- type: :koji,
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
- type: :kake,
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:, type:, index:, group_index:, date:, weight:)
12
- super(date, type)
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 << type
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, o&.type)
11
+ super(o&.date, :rice)
12
+ @rice_type = o&.rice_type
11
13
  @breakdown = events
12
14
  end
13
15
 
@@ -1,3 +1,3 @@
1
1
  module Toji
2
- VERSION = "2.8.0"
2
+ VERSION = "2.9.0"
3
3
  end
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.8.0
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.1.2
193
+ rubygems_version: 3.0.4
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: Management tools for brewing japanese sake.