Sha256: 61c60f5366bcafa263d48f3f02df5bd3d4e58f142645b6ad32c94bdc84bc2d73
Contents?: true
Size: 886 Bytes
Versions: 2
Compression:
Stored size: 886 Bytes
Contents
# frozen_string_literal: true require "relaton_bib/localized_string" module RelatonBib # Document status. class DocumentStatus # @return [String] attr_reader :stage # @return [String, NilClass] attr_reader :substage # @return [String, NilClass] attr_reader :iteration # @param stage [String] # @param substage [String, NilClass] # @param iteration [String, NilClass] def initialize(stage:, substage: nil, iteration: nil) @stage = stage @substage = substage @iteration = iteration end # @param [Nokogiri::XML::Builder] def to_xml(builder) builder.status do # FormattedString.instance_method(:to_xml).bind(status).call builder builder.stage stage builder.substage substage if substage builder.iteration iteration unless iteration.to_s.empty? end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
relaton-bib-0.3.3 | lib/relaton_bib/document_status.rb |
relaton-bib-0.3.2 | lib/relaton_bib/document_status.rb |