Class: RubyEdit::Commands::Edit
- Inherits:
-
Object
- Object
- RubyEdit::Commands::Edit
- Defined in:
- lib/ruby_edit/commands/edit.rb
Overview
TODO: Write an integration spec for this
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ Edit
constructor
A new instance of Edit.
Constructor Details
#initialize(options) ⇒ Edit
14 15 16 17 18 19 20 |
# File 'lib/ruby_edit/commands/edit.rb', line 14 def initialize() @grep = RubyEdit::Grep.new() @sourcefile = RubyEdit::SourceFile.new @editor = RubyEdit::Editor.new @output = $stdout @errors = $stderr end |
Instance Method Details
#execute ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/ruby_edit/commands/edit.rb', line 22 def execute grep_search populate_sourcefile edit_file apply_changes if apply_changes? delete_sourcefile end |