require_relative '../../lib/string_helper' namespace :build do def camelize(snake_case_string) snake_case_string.split('_').collect(&:capitalize).join end desc 'Build use case markdown' task :use_cases do # Page that links to use cases. File.open('use_cases.md', 'w') do |use_case_file| use_case_file.puts(< %w/ reuse_text nest_inclusions include_markdown include_code_block include_highlighted_code include_page_toc include_text_as_details include_text_as_comment include_text_as_pre include_generated_text include_with_added_comments diagnose_missing_includee diagnose_circular_includes /, } use_case_dirs.each_pair do |section, dir_names| # Header for section, if any dirs therein. title = StringHelper.to_title(section.to_s).sub(/ toc$/i, ' TOC') use_case_file.puts(<