Sha256: ed785a43e16b07401bb67906db1327cb11a75b21747d1cd2d6402d01b1b850a9

Contents?: true

Size: 626 Bytes

Versions: 28

Compression:

Stored size: 626 Bytes

Contents

module Workarea
  class Release
    module Status
      class Unscheduled
        include StatusCalculator::Status

        def in_status?
          model.publish_at.blank? && model.published_at.blank?
        end
      end

      class Scheduled
        include StatusCalculator::Status

        def in_status?
          return false unless model.publish_at.present?
          model.publish_at >= Time.current
        end
      end

      class Published
        include StatusCalculator::Status

        def in_status?
          model.published_at.present? && model.publish_at.blank?
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-core-3.5.6 app/models/workarea/release/status.rb
workarea-core-3.5.5 app/models/workarea/release/status.rb
workarea-core-3.5.4 app/models/workarea/release/status.rb
workarea-core-3.5.3 app/models/workarea/release/status.rb
workarea-core-3.5.2 app/models/workarea/release/status.rb
workarea-core-3.5.1 app/models/workarea/release/status.rb
workarea-core-3.5.0 app/models/workarea/release/status.rb
workarea-core-3.5.0.beta.1 app/models/workarea/release/status.rb