Exception: Apipie::Params::Errors::Invalid

Inherits:
ParamError
  • Object
show all
Defined in:
lib/apipie/params/errors.rb

Instance Attribute Summary collapse

Attributes inherited from ParamError

#description

Instance Method Summary collapse

Constructor Details

#initialize(description, value, error) ⇒ Invalid

Returns a new instance of Invalid.



22
23
24
25
26
# File 'lib/apipie/params/errors.rb', line 22

def initialize(description, value, error)
  super(description)
  @value = value
  @error = error
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



20
21
22
# File 'lib/apipie/params/errors.rb', line 20

def error
  @error
end

#valueObject

Returns the value of attribute value.



20
21
22
# File 'lib/apipie/params/errors.rb', line 20

def value
  @value
end

Instance Method Details

#to_sObject



28
29
30
# File 'lib/apipie/params/errors.rb', line 28

def to_s
  "Invalid parameter '#{description.name}' value #{@value.inspect}: #{@error}"
end