Sha256: 571c0f035a6c41d3f99c20a15d2af38851900aa736b535b71de7e802c9b2241e

Contents?: true

Size: 661 Bytes

Versions: 8

Compression:

Stored size: 661 Bytes

Contents

module RelatonBib
  class BiblioNote < FormattedString
    # @return [String]
    attr_reader :type

    # @param content [String]
    # @param type [String]
    # @param language [String] language code Iso639
    # @param script [String] script code Iso15924
    # @param format [String] the content type
    def initialize(content:, type: nil, language: nil, script: nil, format: nil)
      @type = type
      super content: content, language: language, script: script, format: format
    end

    # @param builder [Nokogiri::XML::Builder]
    def to_xml(builder)
      xml = builder.note { super }
      xml[:type] = type if type
      xml
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
relaton-bib-0.3.3 lib/relaton_bib/biblio_note.rb
relaton-bib-0.3.2 lib/relaton_bib/biblio_note.rb
relaton-bib-0.2.3 lib/relaton_bib/biblio_note.rb
relaton-bib-0.2.2 lib/relaton_bib/biblio_note.rb
relaton-bib-0.2.1 lib/relaton_bib/biblio_note.rb
relaton-bib-0.2.0 lib/relaton_bib/biblio_note.rb
relaton-bib-0.1.6 lib/relaton_bib/biblio_note.rb
relaton-bib-0.1.5 lib/relaton_bib/biblio_note.rb