Exception: SpreedlyCore::UnprocessableRequest

Inherits:
Error
  • Object
show all
Defined in:
lib/spreedly-core-ruby.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ UnprocessableRequest

Returns a new instance of UnprocessableRequest.



37
38
39
40
41
42
# File 'lib/spreedly-core-ruby.rb', line 37

def initialize(errors)
  errors = [errors] unless errors.is_a?(Array)
  @errors = errors

  super(errors.join("\n"))
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



35
36
37
# File 'lib/spreedly-core-ruby.rb', line 35

def errors
  @errors
end