consul/consul

View on GitHub
app/models/legislation/process/publication.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Legislation::Process::Publication
  def initialize(publication_date, enabled)
    @publication_date = publication_date
    @enabled = enabled
  end

  def enabled?
    @enabled
  end

  def started?
    enabled? && Date.current >= @publication_date
  end

  def open?
    started?
  end
end