Method: Pry::Editor#edit_tempfile_with_content
- Defined in:
- lib/pry/editor.rb
#edit_tempfile_with_content(initial_content, line = 1) ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/pry/editor.rb', line 31 def edit_tempfile_with_content(initial_content, line = 1) temp_file do |f| f.puts(initial_content) f.flush f.close(false) invoke_editor(f.path, line, true) File.read(f.path) end end |