Class: RubyEdit::Commands::Grep
- Inherits:
-
Object
- Object
- RubyEdit::Commands::Grep
- Defined in:
- lib/ruby_edit/commands/grep.rb
Instance Method Summary collapse
- #execute(output: $stdout) ⇒ Object
-
#initialize(options) ⇒ Grep
constructor
A new instance of Grep.
Constructor Details
#initialize(options) ⇒ Grep
Returns a new instance of Grep.
8 9 10 11 |
# File 'lib/ruby_edit/commands/grep.rb', line 8 def initialize() = @grep = RubyEdit::Grep.new() end |
Instance Method Details
#execute(output: $stdout) ⇒ Object
13 14 15 16 |
# File 'lib/ruby_edit/commands/grep.rb', line 13 def execute(output: $stdout) @result = @grep.search(output: output) output.puts 'OK' end |