module ADIWG::Mdtranslator::Writers::MdJson::Contact

Public Class Methods

build(hContact) click to toggle source
# File lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb, line 22
def self.build(hContact)

   Jbuilder.new do |json|
      json.contactId hContact[:contactId]
      json.isOrganization hContact[:isOrganization]
      json.name hContact[:name]
      json.externalIdentifier hContact[:externalIdentifier] unless hContact[:externalIdentifier].empty?
      json.positionName hContact[:positionName]
      json.memberOfOrganization hContact[:memberOfOrgs] unless hContact[:memberOfOrgs].empty?
      json.logoGraphic @Namespace.json_map(hContact[:logos], GraphicOverview)
      json.phone @Namespace.json_map(hContact[:phones], Phone)
      json.address @Namespace.json_map(hContact[:addresses], Address)
      json.electronicMailAddress hContact[:eMailList] unless hContact[:eMailList].empty?
      json.onlineResource @Namespace.json_map(hContact[:onlineResources], OnlineResource)
      json.hoursOfService hContact[:hoursOfService] unless hContact[:hoursOfService].empty?
      json.contactInstructions hContact[:contactInstructions]
      json.contactType hContact[:contactType]
   end

end