Class: Zakuro::Operation::Month
- Inherits:
-
Object
- Object
- Zakuro::Operation::Month
- Defined in:
- lib/zakuro/operation/month/type.rb
Overview
Month 月差分
Instance Attribute Summary collapse
-
#is_many_days ⇒ Days
readonly
月の大小.
-
#leaped ⇒ Leaped
readonly
閏有無.
-
#number ⇒ Number
readonly
月.
Instance Method Summary collapse
-
#initialize(number: Number.new, leaped: Leaped.new, is_many_days: Days.new) ⇒ Month
constructor
初期化.
-
#invalid? ⇒ True, False
無効か.
Constructor Details
#initialize(number: Number.new, leaped: Leaped.new, is_many_days: Days.new) ⇒ Month
初期化
200 201 202 203 204 |
# File 'lib/zakuro/operation/month/type.rb', line 200 def initialize(number: Number.new, leaped: Leaped.new, is_many_days: Days.new) @number = number @leaped = leaped @is_many_days = is_many_days end |
Instance Attribute Details
#is_many_days ⇒ Days (readonly)
Returns 月の大小.
189 190 191 |
# File 'lib/zakuro/operation/month/type.rb', line 189 def is_many_days @is_many_days end |
#leaped ⇒ Leaped (readonly)
Returns 閏有無.
187 188 189 |
# File 'lib/zakuro/operation/month/type.rb', line 187 def leaped @leaped end |
#number ⇒ Number (readonly)
Returns 月.
185 186 187 |
# File 'lib/zakuro/operation/month/type.rb', line 185 def number @number end |
Instance Method Details
#invalid? ⇒ True, False
無効か
212 213 214 |
# File 'lib/zakuro/operation/month/type.rb', line 212 def invalid? number == -1 end |