Sha256: cdbeadf660a906306856d8a4c759f35253c4ec8a2732405a6fc75160cdbdbc95

Contents?: true

Size: 242 Bytes

Versions: 2

Compression:

Stored size: 242 Bytes

Contents

# frozen_string_literal: true

WCC::Contentful::Metadata =
  Struct.new(:raw) do
    def tags
      @tags ||=
        Array(raw['tags'] || []).map do |tag|
          WCC::Contentful::Link.new(tag) if tag.is_a?(Hash)
        end
    end
  end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wcc-contentful-1.7.2 lib/wcc/contentful/metadata.rb
wcc-contentful-1.7.1 lib/wcc/contentful/metadata.rb