Module: Dcc::Base::Identification

Included in:
V2::Identification, V3::Identification
Defined in:
lib/dcc/base/identification.rb

Overview

dcc:identificationType — single identifier (issuer, value, optional description). Issuer enum: manufacturer, calibrationLaboratory, customer, owner, other.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dcc/base/identification.rb', line 9

def self.included(klass)
  klass.class_eval do
    attribute :issuer, :string
    attribute :value, :string
    attribute :description, :text

    xml do
      namespace ::Dcc::Namespace::Dcc
      element "identification"
      ordered
      map_element "issuer", to: :issuer
      map_element "value", to: :value
      map_element "description", to: :description
    end
  end
end