Sha256: cc248dafad2ce04fa33aad57670cfeb77f6acebf4cfb39488430450b1632ad1b
Contents?: true
Size: 402 Bytes
Versions: 1
Compression:
Stored size: 402 Bytes
Contents
# frozen_string_literal: true module Clamp module Subcommand Definition = Struct.new(:names, :description, :subcommand_class) do def initialize(names, description, subcommand_class) names = Array(names) super end def is_called?(name) names.member?(name) end def help [names.join(", "), description] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
clamp-1.3.2 | lib/clamp/subcommand/definition.rb |