Sha256: a61c96db4849397ca0bbb180cda3faec58c65113d4fc5c61a93bc1d6de71aa03

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 Bytes

Contents

module NistBib
  class DocumentStatus < RelatonBib::DocumentStatus
    STAGES = %w[
      draft-internal draft-wip draft-prelim draft-public final final-review
    ].freeze

    SUBSTAGES = %w[active retired withdrawn].freeze

    # @param stage [String]
    # @param substage [String, NilClass]
    # @param iteration [String, NilClass]
    def initialize(stage:, substage: nil, iteration: nil)
      # unless STAGES.include? stage
      #   raise ArgumentError, "invalid argument: stage (#{stage})"
      # end

      # if substage && !SUBSTAGES.include?(substage)
      #   raise ArgumentError, "invalid argument: substage (#{substage})"
      # end

      super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nistbib-0.1.9 lib/nistbib/document_status.rb
nistbib-0.1.8 lib/nistbib/document_status.rb