Module: Toji::Progress::MoromiState
- Includes:
- BaseState
- Defined in:
- lib/toji/progress/moromi_state.rb
Constant Summary
collapse
- KEYS =
(BaseState::KEYS + [
:moromi_day,
:baume,
:nihonshudo,
:display_baume,
:alcohol,
:bmd,
:acid,
:amino_acid,
:glucose,
:warmings,
]).freeze
Instance Method Summary
collapse
Methods included from BaseState
#day, #day_label, #display_time, #elapsed_time, #elapsed_time_with_offset, #room_psychrometry, #room_relative_humidity_from_dry_and_wet
Instance Method Details
#bmd ⇒ Object
47
48
49
50
51
52
53
54
|
# File 'lib/toji/progress/moromi_state.rb', line 47
def bmd
_moromi_day = moromi_day
_baume = baume
if _moromi_day && _baume
_moromi_day * _baume
end
end
|
#display_baume ⇒ Object
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/toji/progress/moromi_state.rb', line 36
def display_baume
_baume = baume
if _baume
if _baume<3.0
nihonshudo
else
_baume
end
end
end
|
#expected_alcohol(target_alc, target_nihonshudo, coef) ⇒ Object
56
57
58
59
60
61
62
|
# File 'lib/toji/progress/moromi_state.rb', line 56
def expected_alcohol(target_alc, target_nihonshudo, coef)
_baume = baume
if _baume
target_alc - (_baume - target_nihonshudo * -0.1) * coef
end
end
|
#moromi_day ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/toji/progress/moromi_state.rb', line 27
def moromi_day
_tome_day = progress.moromi_tome_day
_now_day = day
if _tome_day && _tome_day < _now_day
_now_day - _tome_day + 1
end
end
|