lib/timeboss/calendar.rb in timeboss-0.2.5 vs lib/timeboss/calendar.rb in timeboss-0.3.0
- old
+ new
@@ -39,9 +39,15 @@
# @return [Boolean]
def supports_weeks?
true
end
+ def self.register!
+ return unless TimeBoss::Calendars.method_defined?(:register)
+ TimeBoss::Calendars.register(self.name.to_s.demodulize.underscore, self)
+ end
+ private_class_method :register!
+
protected
attr_reader :basis
def initialize(basis:)