Sha256: f81d4facfc448abcdcef54ef8456540b2bb7dc3a6e34f6dfbf3e2221045ee08b

Contents?: true

Size: 810 Bytes

Versions: 58

Compression:

Stored size: 810 Bytes

Contents

# sbJson 1.0 writer browse categories

# History:
#  Stan Smith 2017-05-31 original script

require 'jbuilder'
require_relative 'sbJson_codelists'

module ADIWG
   module Mdtranslator
      module Writers
         module SbJson

            module BrowseCategory

               def self.build(aTypes)

                  aCategories = []

                  # always include a 'Data' browse category
                  aCategories << 'Data'

                  aTypes.each do |hType|
                     type = hType[:type]
                     sbType = Codelists.codelist_adiwg2sb('scope_adiwg2sb', type)
                     aCategories << sbType unless sbType.nil?
                  end

                  aCategories = aCategories.uniq

               end

            end

         end
      end
   end
end

Version data entries

58 entries across 58 versions & 1 rubygems

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