Class: Ellipses::Client::Commands::Substitute
- Inherits:
-
Ellipses::Client::Command
- Object
- Ellipses::Client::Command
- Ellipses::Client::Commands::Substitute
- Defined in:
- lib/ellipses/client/commands/substitute.rb
Constant Summary
Constants inherited from Ellipses::Client::Command
Ellipses::Client::Command::Error
Instance Attribute Summary
Attributes inherited from Ellipses::Client::Command
Instance Method Summary collapse
Methods included from Ellipses::Client::Command::Mixins::SetupPattern
Methods inherited from Ellipses::Client::Command
Methods included from Ellipses::Client::Command::DSL
Constructor Details
This class inherits a constructor from Ellipses::Client::Command
Instance Method Details
#call(input) ⇒ Object
17 18 19 |
# File 'lib/ellipses/client/commands/substitute.rb', line 17 def call(input) input.map { |line| line.gsub param.pattern, param.replace } end |
#setup ⇒ Object
11 12 13 14 15 |
# File 'lib/ellipses/client/commands/substitute.rb', line 11 def setup super param.replace = argv.last end |