Module: Dcc::Base::CalibrationLaboratory

Included in:
V2::CalibrationLaboratory, V3::CalibrationLaboratory
Defined in:
lib/dcc/base/calibration_laboratory.rb

Overview

dcc:calibrationLaboratoryType — lab code plus contact info.

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



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

def self.included(klass)
  klass.class_eval do
    attribute :id, :string
    attribute :ref_id, :string
    attribute :ref_type, :string
    attribute :calibration_laboratory_code, :string
    attribute :contact, :contact, collection: true

    xml do
      namespace ::Dcc::Namespace::Dcc
      element "calibrationLaboratory"
      ordered
      map_attribute "id", to: :id
      map_attribute "refId", to: :ref_id
      map_attribute "refType", to: :ref_type
      map_element "calibrationLaboratoryCode", to: :calibration_laboratory_code
      map_element "contact", to: :contact
    end
  end
end