Class: Zakuro::Operation::Validator::Month
- Inherits:
-
Object
- Object
- Zakuro::Operation::Validator::Month
- Defined in:
- lib/zakuro/operation/month/validator.rb
Overview
Month 月
Instance Attribute Summary collapse
-
#days ⇒ String
readonly
中気差分.
-
#index ⇒ Integer
readonly
連番.
-
#leaped ⇒ Hash
readonly
閏有無差分.
-
#number ⇒ Hash
readonly
月差分.
Instance Method Summary collapse
-
#initialize(index:, yaml_hash: {}) ⇒ Month
constructor
初期化.
-
#validate ⇒ Array<String>
検証する.
Constructor Details
#initialize(index:, yaml_hash: {}) ⇒ Month
初期化
428 429 430 431 432 433 |
# File 'lib/zakuro/operation/month/validator.rb', line 428 def initialize(index:, yaml_hash: {}) @index = index @number = Number.new(index: index, yaml_hash: yaml_hash['number']) @leaped = Leaped.new(index: index, yaml_hash: yaml_hash['leaped']) @days = Days.new(index: index, yaml_hash: yaml_hash['days']) end |
Instance Attribute Details
#days ⇒ String (readonly)
Returns 中気差分.
417 418 419 |
# File 'lib/zakuro/operation/month/validator.rb', line 417 def days @days end |
#index ⇒ Integer (readonly)
Returns 連番.
411 412 413 |
# File 'lib/zakuro/operation/month/validator.rb', line 411 def index @index end |
#leaped ⇒ Hash (readonly)
Returns 閏有無差分.
415 416 417 |
# File 'lib/zakuro/operation/month/validator.rb', line 415 def leaped @leaped end |
#number ⇒ Hash (readonly)
Returns 月差分.
413 414 415 |
# File 'lib/zakuro/operation/month/validator.rb', line 413 def number @number end |
Instance Method Details
#validate ⇒ Array<String>
検証する
440 441 442 443 444 445 446 447 448 449 450 |
# File 'lib/zakuro/operation/month/validator.rb', line 440 def validate failed = [] failed += number.validate failed += leaped.validate failed += days.validate failed end |