DannyBen/madman

View on GitHub
lib/madman/refinements/array.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ArrayRefinements
  refine Array do
    def to_markdown
      map { |item| "- #{item}" }.join "\n"
    end

    def to_html
      Commonmarker.to_html to_markdown, options: { extension: { table: true } }
    end
  end
end