Exception: NContent::SDK::Testing::ServerMock::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- NContent::SDK::Testing::ServerMock::ValidationError
- Defined in:
- lib/ncontent/sdk/testing/server_mock.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors = {}) ⇒ ValidationError
constructor
A new instance of ValidationError.
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
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
14 15 16 |
# File 'lib/ncontent/sdk/testing/server_mock.rb', line 14 def errors @errors end |