Sha256: 7af8fc3f82e0d0ff70c72b0b3e8c7f920de368b6b5cf80216f2dfc1ae98276e2

Contents?: true

Size: 264 Bytes

Versions: 2

Compression:

Stored size: 264 Bytes

Contents

module Lino
  module Utilities
    def map_and_join(collection, &block)
      collection.map { |item| block.call(item) }.join(' ')
    end

    def join_with(separator)
      lambda { |item| item[:components].join(item[:separator] || separator) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lino-1.2.0.pre.1 lib/lino/utilities.rb
lino-1.1.0 lib/lino/utilities.rb