Exception: Cri::CommandDSL::AlreadySpecifiedAsNoParams

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

Overview

Error that will be raised when specifying a parameter after the command is already declared as taken no params.

Instance Method Summary collapse

Constructor Details

#initialize(param, command) ⇒ AlreadySpecifiedAsNoParams

Returns a new instance of AlreadySpecifiedAsNoParams.



10
11
12
13
# File 'lib/cri/command_dsl.rb', line 10

def initialize(param, command)
  @param = param
  @command = command
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/cri/command_dsl.rb', line 15

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