Class: Zakuro::Operation::SolarTerm::Direction
- Inherits:
-
Object
- Object
- Zakuro::Operation::SolarTerm::Direction
- Defined in:
- lib/zakuro/operation/month/type.rb
Overview
Direction 二十四節気(移動)
Instance Attribute Summary collapse
-
#days ⇒ Integer
readonly
大余差分.
-
#destination ⇒ Destination
readonly
二十四節気(移動先).
-
#source ⇒ Source
readonly
二十四節気(移動元).
Instance Method Summary collapse
-
#initialize(source: Source.new, destination: Destination.new, days: INVALID_DAY_VALUE) ⇒ Direction
constructor
初期化.
-
#invalid? ⇒ True, False
無効か.
-
#invalid_days? ⇒ True, False
無効か(大余差分).
Constructor Details
#initialize(source: Source.new, destination: Destination.new, days: INVALID_DAY_VALUE) ⇒ Direction
初期化
239 240 241 242 243 244 |
# File 'lib/zakuro/operation/month/type.rb', line 239 def initialize(source: Source.new, destination: Destination.new, days: INVALID_DAY_VALUE) @source = source @destination = destination @days = days end |
Instance Attribute Details
#days ⇒ Integer (readonly)
Returns 大余差分.
230 231 232 |
# File 'lib/zakuro/operation/month/type.rb', line 230 def days @days end |
#destination ⇒ Destination (readonly)
Returns 二十四節気(移動先).
228 229 230 |
# File 'lib/zakuro/operation/month/type.rb', line 228 def destination @destination end |
#source ⇒ Source (readonly)
Returns 二十四節気(移動元).
226 227 228 |
# File 'lib/zakuro/operation/month/type.rb', line 226 def source @source end |
Instance Method Details
#invalid? ⇒ True, False
無効か
262 263 264 |
# File 'lib/zakuro/operation/month/type.rb', line 262 def invalid? source.invalid? && destination.invalid? end |
#invalid_days? ⇒ True, False
無効か(大余差分)
252 253 254 |
# File 'lib/zakuro/operation/month/type.rb', line 252 def invalid_days? days == INVALID_DAY_VALUE end |