Method: Arc42Pandoc::MarkdownBuilder#list
- Defined in:
- lib/arc42-pandoc/markdown/markdown_builder.rb
#list ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/arc42-pandoc/markdown/markdown_builder.rb', line 21 def list files = Dir[File.join(dirname, 'templates', '**/*')].select { |file| File.file?(file) } chunks = files.group_by { |file| file.split('/')[-2] } chunks.each { |lang, templates| puts "Templates available for language '#{lang}': \n * #{templates.map { |t| t.split('/')[-1] }.join("\n * ")}\n\n" } end |