Class: Holidays::Definition::Validator::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/holidays/definition/validator/test.rb

Instance Method Summary collapse

Instance Method Details

#valid?(t) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
# File 'lib/holidays/definition/validator/test.rb', line 5

def valid?(t)
  valid_dates?(t[:dates]) &&
    valid_regions?(t[:regions]) &&
    valid_name?(t[:name]) &&
    valid_holiday?(t[:holiday]) &&
    valid_options?(t[:options]) &&
    required_fields?(t)
end