class Webgen::CLI::ShowExtensionsCommand
The CLI command for showing available extension.
Private Instance Methods
format_extension_info(name, data, has_selector)
click to toggle source
# File lib/webgen/cli/commands/show_extensions.rb, line 36 def format_extension_info(name, data, has_selector) author = (!data['author'] || data['author'].empty? ? 'unknown' : data['author']) indentation = (has_selector ? 0 : name.count('.')*2) puts(" "*indentation + Utils.light(Utils.blue(name))) if command_parser.verbose print(" "*(indentation + 2) + "Bundle: ") puts(Utils.format(data['bundle'], 78, indentation + 11, false)) print(" "*(indentation + 2) + "Author: ") puts(Utils.format(author, 78, indentation + 11, false)) print(" "*(indentation + 2) + "Summary: ") puts(Utils.format(data['summary'], 78, indentation + 11, false)) else puts(Utils.format(data['summary'], 78, indentation + 2, true).join("\n")) end puts end