Exception: Cri::CommandDSL::AlreadySpecifiedWithParams

Inherits:
Error
  • Object
show all
Defined in:
lib/cri/command_dsl.rb

Overview

Error that will be raised when declaring the command as taking no parameters, when the command is already declared with parameters.

Instance Method Summary collapse

Constructor Details

#initialize(command) ⇒ AlreadySpecifiedWithParams

Returns a new instance of AlreadySpecifiedWithParams.



23
24
25
# File 'lib/cri/command_dsl.rb', line 23

def initialize(command)
  @command = command
end

Instance Method Details

#messageObject



27
28
29
# File 'lib/cri/command_dsl.rb', line 27

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."
end