Class: MarkdownFormatter::CLI
- Inherits:
-
Object
- Object
- MarkdownFormatter::CLI
- Defined in:
- lib/markdown_formatter/cli.rb
Class Method Summary collapse
Class Method Details
.run(filepath) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/markdown_formatter/cli.rb', line 3 def self.run(filepath) result = MarkdownFormatter.format(File.read(filepath)) if MarkdownFormatter::OPTIONS[:overwrite] File.write(filepath, result) else puts result end end |