Exception: Dynamoid::Errors::DocumentNotValid

Inherits:
Error
  • Object
show all
Defined in:
lib/dynamoid/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document) ⇒ DocumentNotValid

Returns a new instance of DocumentNotValid.



69
70
71
72
# File 'lib/dynamoid/errors.rb', line 69

def initialize(document)
  super("Validation failed: #{document.errors.full_messages.join(', ')}")
  @document = document
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



67
68
69
# File 'lib/dynamoid/errors.rb', line 67

def document
  @document
end