Sha256: de7f1660843a62e6ed08a1a833f53c4a2b00f965d97e265d9f6aa51d33d67257
Contents?: true
Size: 399 Bytes
Versions: 5
Compression:
Stored size: 399 Bytes
Contents
class FormatCode2Doc def call(code) out = "" title = "#{code.filename} (#{code.type})" out << ("-" * title.size + "\n") out << "#{title}\n" if code.features.size.positive? out << "* features: #{code.features.join(", ")}" end out << "\n" code.lines.each_with_index do |line, index| out << "#{index} | #{line}\n" end out << "\n" out end end
Version data entries
5 entries across 5 versions & 1 rubygems