Methods

Gherkin::Tools::Reformat

Public Instance Methods

run() click to toggle source
    # File lib/gherkin/tools/reformat.rb, line 9
 9:       def run
10:         each do |file|
11:           io = defined?(JRUBY_VERSION) ? Java.java.io.StringWriter.new : StringIO.new
12:           formatter = Formatter::PrettyFormatter.new(io, true)
13:           listener = Listener::FormatterListener.new(formatter)
14:           scan(file, listener)
15:           string = defined?(JRUBY_VERSION) ? io.getBuffer.toString : io.string
16:           File.open(file, 'w') {|io| io.write(string)}
17:         end
18:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.