Sha256: 4c8c7a7bf4401f5027d91182cde0bf5e771564f2e894d22b814be1b34ce8fc56

Contents?: true

Size: 598 Bytes

Versions: 25

Compression:

Stored size: 598 Bytes

Contents

# frozen_string_literal: true

require 'yaml'

module PlatformosCheck
  module PlatformosLiquid
    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

25 entries across 25 versions & 1 rubygems

Version Path
platformos-check-0.4.14 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.13 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.12 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.11 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.10 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.9 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.8 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.7 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.6 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.5 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.4 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.3 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.2 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.1 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.4.0 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.3.3 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.3.1 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.3.0 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.2.2 lib/platformos_check/platformos_liquid/deprecated_filter.rb
platformos-check-0.2.1 lib/platformos_check/platformos_liquid/deprecated_filter.rb