Class: Holidays::Definition::Generator::Regions

Inherits:
Object
  • Object
show all
Defined in:
lib/holidays/definition/generator/regions.rb

Constant Summary collapse

NORTH_AMERICA_REGIONS =

The “ca”, “mx”, and “us” holiday definitions include the “northamericainformal” holiday definitions, but that does not make these countries subregions of one another.

i[ca mx us].freeze

Instance Method Summary collapse

Instance Method Details

#call(regions) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/holidays/definition/generator/regions.rb', line 9

def call(regions)
  validate!(regions)

  "# encoding: utf-8\nmodule Holidays\n  REGIONS = \#{to_array(regions)}\n\n  PARENT_REGION_LOOKUP = \#{generate_parent_lookup(regions)}\nend\n"
end