lib/clamp/subcommand/definition.rb in clamp-1.3.1 vs lib/clamp/subcommand/definition.rb in clamp-1.3.2
- old
+ new
@@ -1,18 +1,15 @@
# frozen_string_literal: true
module Clamp
module Subcommand
- Definition = Struct.new(:name, :description, :subcommand_class) do
+ Definition = Struct.new(:names, :description, :subcommand_class) do
def initialize(names, description, subcommand_class)
- @names = Array(names)
- @description = description
- @subcommand_class = subcommand_class
+ names = Array(names)
+ super
end
-
- attr_reader :names, :description, :subcommand_class
def is_called?(name)
names.member?(name)
end