Sha256: 74749d4c581a84c5786aba005872423111f3fdb201b32e251245f07e6467ddb2

Contents?: true

Size: 367 Bytes

Versions: 5

Compression:

Stored size: 367 Bytes

Contents

module BuntoSeoTag
  module Filters
    # This is available in Liquid from version 3 which is required by Bunto 2
    # Provided here for compatibility with Bunto 1.x
    def default(input, default_value = ''.freeze)
      if !input || input.respond_to?(:empty?) && input.empty?
        default_value
      else
        input
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bunto-seo-tag-5.0.0 lib/bunto-seo-tag/filters.rb
bunto-seo-tag-4.0.0 lib/bunto-seo-tag/filters.rb
bunto-seo-tag-3.0.0 lib/bunto-seo-tag/filters.rb
bunto-seo-tag-2.0.0 lib/bunto-seo-tag/filters.rb
bunto-seo-tag-1.0.0 lib/bunto-seo-tag/filters.rb