Sha256: 70c4eb2ebc5cdfa3facd6303530b33cbcf4c799353e32905702915f3519712c4

Contents?: true

Size: 453 Bytes

Versions: 24

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  module Helpers
    # Array handling routines, eg. join, join_prefix, join_post
    module Array
      # Join: join an array of values with separator as a string
      class Join < Handlebarsjs::BaseHelper
        register_cmdlet(Cmdlet::Array::Join)

        def to_proc
          ->(values, separator = ',', _opts) { wrapper(cmdlet.call(values, separator)) }
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
handlebarsjs-0.5.5 lib/handlebarsjs/helpers/array/join.rb
handlebarsjs-0.5.4 lib/handlebarsjs/helpers/array/join.rb
handlebarsjs-0.5.3 lib/handlebarsjs/helpers/array/join.rb
handlebarsjs-0.5.2 lib/handlebarsjs/helpers/array/join.rb