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



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/apipie/errors.rb', line 28

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