Sha256: e8994ec8b309e6a00f1d7c44a5c05756930fa8b0bbd2977969900c57942790d4

Contents?: true

Size: 553 Bytes

Versions: 4

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true
require 'yaml'

module ThemeCheck
  module ShopifyLiquid
    module DeprecatedFilter
      extend self

      def alternatives(filter)
        all.fetch(filter, nil)
      end

      def labels
        @labels ||= all.keys
      end

      private

      def all
        @all ||= SourceIndex.deprecated_filters
          .values
          .each_with_object({}) do |filters, acc|
          filters.each do |(filter, alternatives)|
            acc[filter] = alternatives
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
theme-check-1.15.0 lib/theme_check/shopify_liquid/deprecated_filter.rb
theme-check-1.14.0 lib/theme_check/shopify_liquid/deprecated_filter.rb
theme-check-1.13.0 lib/theme_check/shopify_liquid/deprecated_filter.rb
theme-check-1.12.1 lib/theme_check/shopify_liquid/deprecated_filter.rb