# File lib/lowline.rb, line 99 def ask_via_editor q, default=nil fn = run_editor do |f| f.puts(default || "") f.puts q.gsub(/^/, "## ") f.puts "##" f.puts "## Enter your text above. Lines starting with a '#' will be ignored." end return unless fn IO.read(fn).gsub(/^#.*$/, "").multistrip end