Class: Redcar::FilterCommand::EvaluateText
- Inherits:
-
EditTabCommand
- Object
- EditTabCommand
- Redcar::FilterCommand::EvaluateText
- Defined in:
- lib/filter_command/commands.rb
Overview
Evaluates the currently selected text or cursor line as a shell command
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/filter_command/commands.rb', line 26 def execute if doc.selection? command = doc.selected_text else command = doc.get_line_without_end_of_line(doc.cursor_line) end FilterCommand::Evaluator.evaluate(command,"None",FilterCommand::History.output_type) end |