class SyntaxTree::CLI::Format

An action of the CLI that formats the input source and prints it out.

Public Instance Methods

run(item) click to toggle source
# File lib/syntax_tree/cli.rb, line 312
def run(item)
  formatted =
    item.handler.format(
      item.source,
      options.print_width,
      options: options.formatter_options
    )

  puts formatted
end