Class: CodeFormatter::CLI
- Inherits:
-
Thor
- Object
- Thor
- CodeFormatter::CLI
- Defined in:
- lib/code_formatter/cli.rb
Instance Method Summary collapse
Instance Method Details
#format ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/code_formatter/cli.rb', line 21 def format config = Configuration.load_from([:config]) force_all = [:force_all] path = [:path] formatters = [ SwiftFormatFormatter.new(config, path), SwiftLintFormatter.new(config, path), ClangFormatFormatter.new(config, path) ] formatters.each { |f| f&.format(force_all) } end |
#init ⇒ Object
13 14 15 |
# File 'lib/code_formatter/cli.rb', line 13 def init Initializer.init end |