Class: LintTrappings::Command::DisplayFormatters
- Defined in:
- lib/lint_trappings/command/display_formatters.rb
Overview
Displays all available formatters.
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LintTrappings::Command::Base
Instance Method Details
#run ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/lint_trappings/command/display_formatters.rb', line 4 def run formatter_names = LintTrappings::Formatter::Base.descendants.map do |formatter_class| formatter_class.name.split('::').last.sub(/Formatter$/, '').downcase end formatter_names.sort.each do |formatter_name| output.puts " - #{formatter_name}" end end |