Exception: Configurable::Validation::ApiError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/configurable/validation.rb

Overview

Raised when validate_api fails.

Instance Method Summary collapse

Constructor Details

#initialize(input, methods) ⇒ ApiError

Returns a new instance of ApiError.



45
46
47
48
49
50
51
52
# File 'lib/configurable/validation.rb', line 45

def initialize(input, methods)
  super case 
  when methods.empty?
    "no api specified"
  else
    "expected api #{methods.inspect} for: #{input.inspect}"
  end
end