lib/cri/command_dsl.rb in cri-2.15.10 vs lib/cri/command_dsl.rb in cri-2.15.11

- old
+ new

@@ -6,27 +6,18 @@ class CommandDSL # Error that will be raised when specifying a parameter after the command is # already declared as taken no params. class AlreadySpecifiedAsNoParams < Cri::Error def initialize(param, command) - @param = param - @command = command + super("Attempted to specify a parameter #{param.inspect} to the command #{command.name.inspect}, which is already specified as taking no params. Suggestion: remove the #no_params call.") end - - def message - "Attempted to specify a parameter #{@param.inspect} to the command #{@command.name.inspect}, which is already specified as taking no params. Suggestion: remove the #no_params call." - end end # Error that will be raised when declaring the command as taking no # parameters, when the command is already declared with parameters. class AlreadySpecifiedWithParams < Cri::Error def initialize(command) - @command = command - end - - def message - "Attempted to declare the command #{@command.name.inspect} as taking no parameters, but some parameters are already declared for this command. Suggestion: remove the #no_params call." + super("Attempted to declare the command #{command.name.inspect} as taking no parameters, but some parameters are already declared for this command. Suggestion: remove the #no_params call.") end end # @return [Cri::Command] The built command attr_reader :command