Class: Zakuro::Operation::SolarTerm::Destination
- Inherits:
-
Object
- Object
- Zakuro::Operation::SolarTerm::Destination
- Defined in:
- lib/zakuro/operation/month/type.rb
Overview
Destination 二十四節気(移動先)
Instance Attribute Summary collapse
-
#from ⇒ Western::Calendar
readonly
移動元の月初日.
-
#index ⇒ Integer
readonly
二十四節気番号.
-
#zodiac_name ⇒ String
readonly
十干十二支.
Instance Method Summary collapse
-
#initialize(index: -1,, from: Western::Calendar.new, zodiac_name: '') ⇒ Destination
constructor
初期化.
-
#invalid? ⇒ True, False
無効か.
Constructor Details
#initialize(index: -1,, from: Western::Calendar.new, zodiac_name: '') ⇒ Destination
初期化
320 321 322 323 324 |
# File 'lib/zakuro/operation/month/type.rb', line 320 def initialize(index: -1, from: Western::Calendar.new, zodiac_name: '') @index = index @from = from @zodiac_name = zodiac_name end |
Instance Attribute Details
#from ⇒ Western::Calendar (readonly)
Returns 移動元の月初日.
309 310 311 |
# File 'lib/zakuro/operation/month/type.rb', line 309 def from @from end |
#index ⇒ Integer (readonly)
Returns 二十四節気番号.
307 308 309 |
# File 'lib/zakuro/operation/month/type.rb', line 307 def index @index end |
#zodiac_name ⇒ String (readonly)
Returns 十干十二支.
311 312 313 |
# File 'lib/zakuro/operation/month/type.rb', line 311 def zodiac_name @zodiac_name end |
Instance Method Details
#invalid? ⇒ True, False
無効か
332 333 334 |
# File 'lib/zakuro/operation/month/type.rb', line 332 def invalid? index == -1 end |