Module: Adiwg_ResourceFormat
- Defined in:
- lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_resourceFormat.rb
Overview
History: Stan Smith 2013-08-26 original script Stan Smith 2013-11-27 modified to process single resource format rather than array
Class Method Summary collapse
Class Method Details
.unpack(hResFormat) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_resourceFormat.rb', line 10 def self.unpack(hResFormat) # instance classes needed in script intMetadataClass = InternalMetadata.new rFormat = intMetadataClass.newResourceFormat # format - name if hResFormat.has_key?('formatName') s = hResFormat['formatName'] if s != '' rFormat[:formatName] = s end end # format - version if hResFormat.has_key?('version') s = hResFormat['version'] if s != '' rFormat[:formatVersion] = s end end return rFormat end |