Sha256: c62847166235f0ba7a6b1dac6190e2e3a0682046a394b56aa024608b38324174
Contents?: true
Size: 885 Bytes
Versions: 18
Compression:
Stored size: 885 Bytes
Contents
# encoding: UTF-8 module Kafo module HelpBuilders class Basic < Base def add_module(name, items) pruned = except_resets(items) pruned = except_advanced(pruned) data = by_parameter_groups(pruned) add_list(module_header(name), data[DEFAULT_GROUP_NAME]) end def add_list(heading, items) pruned = except_advanced(items) super(heading, pruned) end def string super + "\nOnly commonly used options have been displayed.\nUse --full-help to view the complete list." end private def except_resets(items) items.select { |i| !i.help.first.strip.start_with?('--reset-') || !i.help.last.include?('to the default value (') } end def except_advanced(items) items.reject { |item| item.respond_to?(:advanced?) && item.advanced? } end end end end
Version data entries
18 entries across 18 versions & 1 rubygems