class Zakuro::Operation::Validator::Month
Month
月
Attributes
days[R]
@return [String] 中気差分
index[R]
@return [Integer] 連番
leaped[R]
@return [Hash] 閏有無差分
number[R]
@return [Hash] 月差分
Public Class Methods
new(index:, yaml_hash: {})
click to toggle source
初期化
@param [Integer] index 連番 @param [Hash<String, Object>] yaml_hash yaml @option yaml_hash [Hash] :number 月差分 @option yaml_hash [Hash] :leaped 閏有無差分 @option yaml_hash [String] :days 中気差分
# File lib/zakuro/operation/month/validator.rb, line 420 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
Public Instance Methods
validate()
click to toggle source
検証する
@return [Array<String>] エラーメッセージ
# File lib/zakuro/operation/month/validator.rb, line 432 def validate failed = [] failed += @number.validate failed += @leaped.validate failed += @days.validate failed end