Sha256: 747bfbcdd20fbc4ec9d9c7ceb6583deec842e57846f9030843166a2c805ef7c0

Contents?: true

Size: 403 Bytes

Versions: 15

Compression:

Stored size: 403 Bytes

Contents

# frozen_string_literal: true

module Dri
  module Utils
    class MarkdownLists
      def self.make_list(labels, items)
        list = items.each_with_object([]) do |item, arr|
          item.zip(labels).each do |element, label|
            arr << "<li><b>#{label}</b>:<br> #{element}</li>"
          end
          arr << "<hr>"
        end

        "<ul>#{list.join}</ul>"
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dri-0.11.0 lib/dri/utils/markdown_lists.rb
dri-0.10.2 lib/dri/utils/markdown_lists.rb
dri-0.10.1 lib/dri/utils/markdown_lists.rb
dri-0.10.0 lib/dri/utils/markdown_lists.rb
dri-0.9.0 lib/dri/utils/markdown_lists.rb
dri-0.8.0 lib/dri/utils/markdown_lists.rb
dri-0.7.0 lib/dri/utils/markdown_lists.rb
dri-0.6.1 lib/dri/utils/markdown_lists.rb
dri-0.6.0 lib/dri/utils/markdown_lists.rb
dri-0.5.1 lib/dri/utils/markdown_lists.rb
dri-0.5.0 lib/dri/utils/markdown_lists.rb
dri-0.4.0 lib/dri/utils/markdown_lists.rb
dri-0.3.1 lib/dri/utils/markdown_lists.rb
dri-0.3.0 lib/dri/utils/markdown_lists.rb
dri-0.2.0 lib/dri/utils/markdown_lists.rb