Sha256: 47959e0eabbffe7e86df4be7cd397b1f5cad9c8fee8fd07af08b71a924d19154

Contents?: true

Size: 456 Bytes

Versions: 12

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

require_relative 'base_squeezer'

module R2OAS
  module Schema
    module V3
      class TagSqueezer < BaseSqueezer
        def squeeze_docs
          slice_tags_schema = @schema_data['tags'].each_with_object([]) do |tag, result|
            eql_tag_name = tag['name'].in? @tag_names
            result.push(tag) if eql_tag_name
          end
          { 'tags' => slice_tags_schema }
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
r2-oas-0.5.0 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.4.1 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.4.0 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.3.4 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.3.3 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.3.2 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.3.1 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.3.0 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.2.0 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.1.3 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.1.2 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb
r2-oas-0.1.0 lib/r2-oas/schema/v3/squeezer/tag_squeezer.rb