Sha256: 590f316dbc79f94e9794453699b9fb3d3ac85ae0dfea46c8edaf287275fd762f

Contents?: true

Size: 897 Bytes

Versions: 5

Compression:

Stored size: 897 Bytes

Contents

module Aws
  module Api
    module Docs
      module Crosslink

        EXCLUDE_UIDS = [
          "apigateway",
          "budgets",
          "cloudsearch",
          "cloudsearchdomain",
          "discovery",
          "elastictranscoder",
          "es",
          "glacier",
          "importexport",
          "iot",
          "iot-data",
          "machinelearning",
          "rekognition",
          "s3",
          "sdb",
          "swf"
        ]

        def self.tag_string(uid, name)
          path = "#{ENV['BASEURL']}goto/WebAPI/#{uid}/#{name}"
          "@see #{path} AWS API Documentation"
        end

        def self.taggable?(uid)
          uid && ENV['BASEURL'] && !exclude?(uid)
        end

        private
        def self.exclude?(uid)
          EXCLUDE_UIDS.any? do |service|
            uid.match(/^#{service}/)
          end
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
aws-sdk-core-2.6.42 lib/aws-sdk-core/api/docs/crosslink.rb
aws-sdk-core-2.6.41 lib/aws-sdk-core/api/docs/crosslink.rb
aws-sdk-core-2.6.40 lib/aws-sdk-core/api/docs/crosslink.rb
aws-sdk-core-2.6.39 lib/aws-sdk-core/api/docs/crosslink.rb
aws-sdk-core-2.6.38 lib/aws-sdk-core/api/docs/crosslink.rb