Class: ECG::Command
- Inherits:
-
Object
- Object
- ECG::Command
- Defined in:
- lib/ecg/command.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ecg/command.rb', line 12 def execute @context.parser.parse! # NOTE: ERB.new's non-keyword arguments are deprecated in 2.6 # erb = ERB.new(input.read, trim_mode: context.trim_mode) @context.targets.each do |input, output| erb = ERB.new(input.read, nil, @context.trim_mode) output.puts erb.result(@context.binding) end end |