Sha256: 74cb00164e1872314111fdd7b429d9476de6d84e12fd34a506a1ea8135499ad9
Contents?: true
Size: 596 Bytes
Versions: 8
Compression:
Stored size: 596 Bytes
Contents
module Locomotive module Builder module Liquid module Filters module Misc # was called modulo at first def str_modulo(word, index, modulo) (index.to_i + 1) % modulo == 0 ? word : '' end # Get the nth element of the passed in array def index(array, position) array.at(position) if array.respond_to?(:at) end def default(input, value) input.blank? ? value : input end end ::Liquid::Template.register_filter(Misc) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems