Sha256: 2c96c38d0a8aec6d309085cc8c884538a7fc2913b0dbb2ed2bd37884f743d5c8
Contents?: true
Size: 499 Bytes
Versions: 74
Compression:
Stored size: 499 Bytes
Contents
module Clamp module Subcommand class Definition < Struct.new(:name, :description, :subcommand_class) def initialize(names, description, subcommand_class) @names = Array(names) @description = description @subcommand_class = subcommand_class end attr_reader :names, :description, :subcommand_class def is_called?(name) names.member?(name) end def help [names.join(", "), description] end end end end
Version data entries
74 entries across 70 versions & 18 rubygems