Sha256: 9891788573aa309c170933507ffd66f9965b4b07a032eb1734308ce23bb1ab2f

Contents?: true

Size: 927 Bytes

Versions: 15

Compression:

Stored size: 927 Bytes

Contents

require 'jbuilder'
require_relative 'mdJson_base'
require_relative 'mdJson_onlineResource'
require_relative 'mdJson_phone'
require_relative 'mdJson_address'

module ADIWG
  module Mdtranslator
    module Writers
      module MdJson
        module Contact
          extend MdJson::Base

          def self.build(contact)
            Jbuilder.new do |json|
              # contact
              json.contactId contact[:contactId]
              json.individualName contact[:indName]
              json.organizationName contact[:orgName]
              json.positionName contact[:position]
              json.onlineResource json_map(contact[:onlineRes], OnlineResource)
              json.contactInstructions contact[:contactInstructions]
              json.phoneBook json_map(contact[:phones], Phone)
              json.address Address.build(contact[:address])
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adiwg-mdtranslator-1.4.0 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta14 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta13 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta12 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta11 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta10 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta9 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta8 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta7 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta6 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta5 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta4 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta3 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta2 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb
adiwg-mdtranslator-1.4.0.beta1 lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb