Module: Smartdict::Commands::HasFormatList::ClassMethods
- Defined in:
- lib/smartdict/commands/has_format_list.rb
Instance Method Summary collapse
Instance Method Details
#help_message_with_formats ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/smartdict/commands/has_format_list.rb', line 13 def formats = Smartdict::Core::FormatManager.all width = formats.values.map{|f| f.name.size}.max indent = Smartdict::Commands::AbstractCommand::INDENT_SIZE = " " * indent + "Formats:\n" formats.each do |name, format| << " " * 2 * indent << name.ljust(width) + " " << "#{format.description}\n" end << end |