Module: Availability::Createable

Included in:
Daily, Hourly, Monthly, Once, Weekly, Yearly
Defined in:
lib/availability/createable.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



3
4
5
# File 'lib/availability/createable.rb', line 3

def self.extended(base)
  base.public_class_method :new
end

Instance Method Details

#create(**args) ⇒ Object



7
8
9
10
# File 'lib/availability/createable.rb', line 7

def create(**args)
  frequency = name.split(':').last.downcase.to_sym
  super **args.merge(event_class: self)
end