Exception: Apipie::ParamMissing

Inherits:
DefinedParamError show all
Defined in:
lib/apipie/errors.rb

Instance Attribute Summary

Attributes inherited from DefinedParamError

#param

Instance Method Summary collapse

Methods inherited from DefinedParamError

#initialize

Constructor Details

This class inherits a constructor from Apipie::DefinedParamError

Instance Method Details

#to_sObject



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/apipie/errors.rb', line 42

def to_s
  unless @param.options[:missing_message].nil?
    if @param.options[:missing_message].kind_of?(Proc)
      @param.options[:missing_message].call
    else
      @param.options[:missing_message].to_s
    end
  else
    "Missing parameter #{@param.name}"
  end
end