Module: Vimput
- Defined in:
- lib/vimput.rb,
lib/vimput/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.gets(editor: nil, command: nil) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vimput.rb', line 7 def self.gets(editor: nil, command: nil) tempfile = Tempfile.new('vimput') begin system(EditorCommand.new(editor: editor, command: command).text, tempfile.path) Input.new(tempfile.path).value ensure tempfile.close tempfile.unlink end end |