Class: Holidays::Definition::Validator::CustomMethod

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

Constant Summary collapse

VALID_ARGUMENTS =
["date", "year", "month", "day"]

Instance Method Summary collapse

Instance Method Details

#valid?(m) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/holidays/definition/validator/custom_method.rb', line 7

def valid?(m)
  valid_name?(m[:name]) &&
    valid_arguments?(m[:arguments]) &&
    valid_source?(m[:source])
end