Class: SyntaxTree::CLI::Format
Overview
An action of the CLI that formats the input source and prints it out.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
Methods inherited from Action
#failure, #initialize, #success
Constructor Details
This class inherits a constructor from SyntaxTree::CLI::Action
Instance Method Details
#run(item) ⇒ Object
226 227 228 229 230 231 232 233 234 235 |
# File 'lib/syntax_tree/cli.rb', line 226 def run(item) formatted = item.handler.format( item.source, .print_width, options: . ) puts formatted end |