Exception: NContent::SDK::Testing::ServerMock::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ncontent/sdk/testing/server_mock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors = {}) ⇒ ValidationError

Returns a new instance of ValidationError.



15
16
17
18
19
20
21
22
# File 'lib/ncontent/sdk/testing/server_mock.rb', line 15

def initialize(errors = {})
  @errors = errors.collect({}) do |hsh, keyval|
    key, val = keyval
    hsh[key] = [] unless hsh[key].is_a? Array
    hsh[key] << val
    hsh
  end
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



14
15
16
# File 'lib/ncontent/sdk/testing/server_mock.rb', line 14

def errors
  @errors
end