class Holidays::Definition::Context::Merger
Merge a new set of definitions into the Holidays
module.
Public Class Methods
new(holidays_by_month_repo, regions_repo, custom_methods_repo)
click to toggle source
# File lib/holidays/definition/context/merger.rb, line 6 def initialize(holidays_by_month_repo, regions_repo, custom_methods_repo) @holidays_repo = holidays_by_month_repo @regions_repo = regions_repo @custom_methods_repo = custom_methods_repo end
Public Instance Methods
call(target_regions, target_holidays, target_custom_methods)
click to toggle source
# File lib/holidays/definition/context/merger.rb, line 12 def call(target_regions, target_holidays, target_custom_methods) #FIXME Does this need to come in this exact order? God I hope not. # If not then we should swap the order so it matches the init. @regions_repo.add(target_regions) @holidays_repo.add(target_holidays) @custom_methods_repo.add(target_custom_methods) end