Class: Gherkin::Tools::Reformat
- Defined in:
- lib/gherkin/tools/reformat.rb
Instance Method Summary collapse
Methods inherited from Files
Constructor Details
This class inherits a constructor from Gherkin::Tools::Files
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/gherkin/tools/reformat.rb', line 8 def run each do |file| purdy = StringIO.new listener = PrettyListener.new(purdy) scan(file, listener) purdy.rewind File.open(file, 'w') {|io| io.write(purdy.read)} end end |