Sha256: ba5541439608127e19b84a12245c4aa55b0ac982f0ea3f2ae172b1df7e788f93

Contents?: true

Size: 1.01 KB

Versions: 60

Compression:

Stored size: 1.01 KB

Contents

# unpack titles
# Reader - ScienceBase JSON to internal data structure

# History:
#   Stan Smith 2016-06-13 original script

module ADIWG
   module Mdtranslator
      module Readers
         module SbJson

            module Title

               def self.unpack(hSbJson, hCitation, hResponseObj)

                  # title
                  if hSbJson.has_key?('title')
                     title = hSbJson['title']
                     unless title.nil? || title == ''
                        hCitation[:title] = title
                     end
                  end

                  # alternate titles []
                  if hSbJson.has_key?('alternateTitles')
                     hSbJson['alternateTitles'].each do |item|
                        unless item.nil? || item == ''
                           hCitation[:alternateTitles] << item
                        end
                     end
                  end

                  return hCitation

               end

            end

         end
      end
   end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/readers/sbJson/modules/module_titles.rb