<commit_before># frozen_string_literal: true

module Hyrax
  ##
  # The Valkyrie model for embargos.
  class Embargo < Valkyrie::Resource
    attribute :visibility_after_embargo,  Valkyrie::Types::String
    attribute :visibility_during_embargo, Valkyrie::Types::String
    attribute :embargo_release_date,      Valkyrie::Types::DateTime
    attribute :embargo_history,           Valkyrie::Types::Array

    def active?
      (embargo_release_date.present? && Time.zone.today < embargo_release_date)
    end

    class NullEmbargo
      def id
        nil
      end

      def visibility_after_embargo
        nil
      end

      def visibility_during_embargo
        nil
      end

      def embargo_release_date
        nil
      end

      def embargo_history
        []
      end

      def active?
        false
      end
    end
  end
end
<commit_msg>[wings] Remove dead code `NullEmbargo`<commit_after># frozen_string_literal: true

module Hyrax
  ##
  # The Valkyrie model for embargos.
  class Embargo < Valkyrie::Resource
    attribute :visibility_after_embargo,  Valkyrie::Types::String
    attribute :visibility_during_embargo, Valkyrie::Types::String
    attribute :embargo_release_date,      Valkyrie::Types::DateTime
    attribute :embargo_history,           Valkyrie::Types::Array

    def active?
      (embargo_release_date.present? && Time.zone.today < embargo_release_date)
    end
  end
end

{'fraction_non_alphanumeric': 0.07006369426751592, 'fraction_numerical': 0.0, 'mean_word_length': 2.9060773480662982, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7219065', 'n_tokens_mistral': 449, 'n_tokens_neox': 428, 'n_words': 96}