Module: ActivePeriod::HasMany::Holidays

Includes:
ActivePeriod::HasMany
Included in:
Period
Defined in:
lib/active_period/has_many/holidays.rb

Overview

Note:

when include this module provide access to the holidays of the

FreePeriod

Author:

  • Lucas Billaudot <billau_l@modulotech.fr>

Instance Method Summary collapse

Instance Method Details

#holidays(*args, &block) ⇒ Object



9
10
11
12
# File 'lib/active_period/has_many/holidays.rb', line 9

def holidays(*args, &block)
  raise I18n.t(:gem_require, scope: %i[active_period holiday_period]) unless Object.const_defined?('Holidays')
  ActivePeriod::Collection::HolidayPeriod.new(ActivePeriod::Holiday, self, *args, &block)
end