Module: Dcc::Base::Comment

Included in:
V2::Comment, V3::Comment
Defined in:
lib/dcc/base/comment.rb

Overview

dcc:comment — wildcard (xs:any namespace="##any") wrapper around arbitrary XML. The contents are preserved as a raw XML string; lutaml-model requires map_all to be the only mapping in a class, so the comment element lives in its own class referenced by DigitalCalibrationCertificate.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/dcc/base/comment.rb', line 10

def self.included(klass)
  klass.class_eval do
    attribute :raw, :string

    xml do
      namespace ::Dcc::Namespace::Dcc
      element "comment"
      map_all to: :raw
    end
  end
end