Sha256: 1beeec971076227e0c6faec5cf250d21904df91bddd89e80e112d3333f830486

Contents?: true

Size: 947 Bytes

Versions: 1

Compression:

Stored size: 947 Bytes

Contents

# frozen_string_literal: true

require "lutaml/model"

require_relative "dd"
require_relative "dt"

module Rfcxml
  module V3
    # class Dd < Lutaml::Model::Serializable; end
    # class Dt < Lutaml::Model::Serializable; end

    class Dl < Lutaml::Model::Serializable
      attribute :anchor, :string
      attribute :spacing, :string, default: -> { "normal" }
      attribute :newline, :string, default: -> { "false" }
      attribute :indent, :string, default: -> { "3" }
      attribute :pn, :string
      attribute :dt, Dt, collection: true
      attribute :dd, Dd, collection: true

      xml do
        root "dl", mixed: true

        map_attribute "anchor", to: :anchor
        map_attribute "spacing", to: :spacing
        map_attribute "newline", to: :newline
        map_attribute "indent", to: :indent
        map_attribute "pn", to: :pn
        map_element "dt", to: :dt
        map_element "dd", to: :dd
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rfcxml-0.2.0 lib/rfcxml/v3/dl.rb