Sha256: 7ba2fcf03ba3316e86a501b5411ff733a667f1b259a99c7e7a778e31eafd5018
Contents?: true
Size: 782 Bytes
Versions: 66
Compression:
Stored size: 782 Bytes
Contents
module Picky module Generators # Thrown when no generator for the command # picky <command> <options> # is found. # class NotFoundException < StandardError # :nodoc:all def initialize selector super usage + possible_commands(selector.types) end def usage "\n\nUsage:\n" + " picky-generate <project_type> [params]\n" + ?\n end def possible_commands types "Possible commands:\n" + types.map do |name, klass_params| result = " picky-generate #{name}" _, params = *klass_params result << ' ' << [*params].map { |param| "<#{param}>" }.join(' ') if params result end.join(?\n) + ?\n + ?\n end end end end
Version data entries
66 entries across 66 versions & 1 rubygems