Sha256: f95dd6573ee79fed191d4c58c33bc72f7f72cb544ff196465aed64e627418948

Contents?: true

Size: 175 Bytes

Versions: 18

Compression:

Stored size: 175 Bytes

Contents

module WithTimedEnablement
  extend ActiveSupport::Concern

  def enabled?
    enabled_range.cover? Time.current
  end

  def enabled_range
    start_time..end_time
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
mumuki-domain-9.23.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.22.1 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.22.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.21.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.20.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.19.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.18.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.17.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.16.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.15.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.14.1 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.14.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.13.1 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.13.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.12.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.11.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.10.0 app/models/concerns/with_timed_enablement.rb
mumuki-domain-9.9.0 app/models/concerns/with_timed_enablement.rb