mumuki/mumuki-domain

View on GitHub
app/models/concerns/with_timed_enablement.rb

Summary

Maintainability
A
0 mins
Test Coverage
module WithTimedEnablement
  extend ActiveSupport::Concern

  def enabled?
    enabled_range.cover? Time.current
  end

  def enabled_range
    start_time..end_time
  end
end