Exception: JSONModel::ValidationException
- Inherits:
-
StandardError
- Object
- StandardError
- JSONModel::ValidationException
- Defined in:
- common/jsonmodel.rb
Instance Attribute Summary (collapse)
-
- (Object) attribute_types
Returns the value of attribute attribute_types.
-
- (Object) errors
Returns the value of attribute errors.
-
- (Object) import_context
Returns the value of attribute import_context.
-
- (Object) invalid_object
Returns the value of attribute invalid_object.
-
- (Object) object_context
Returns the value of attribute object_context.
-
- (Object) warnings
Returns the value of attribute warnings.
Instance Method Summary (collapse)
-
- (ValidationException) initialize(opts)
constructor
A new instance of ValidationException.
-
- (Object) to_s
Constructor Details
- (ValidationException) initialize(opts)
Returns a new instance of ValidationException
40 41 42 43 44 45 46 |
# File 'common/jsonmodel.rb', line 40 def initialize(opts) @invalid_object = opts[:invalid_object] @errors = opts[:errors] @import_context = opts[:import_context] @object_context = opts[:object_context] @attribute_types = opts[:attribute_types] end |
Instance Attribute Details
- (Object) attribute_types
Returns the value of attribute attribute_types
36 37 38 |
# File 'common/jsonmodel.rb', line 36 def attribute_types @attribute_types end |
- (Object) errors
Returns the value of attribute errors
34 35 36 |
# File 'common/jsonmodel.rb', line 34 def errors @errors end |
- (Object) import_context
Returns the value of attribute import_context
37 38 39 |
# File 'common/jsonmodel.rb', line 37 def import_context @import_context end |
- (Object) invalid_object
Returns the value of attribute invalid_object
33 34 35 |
# File 'common/jsonmodel.rb', line 33 def invalid_object @invalid_object end |
- (Object) object_context
Returns the value of attribute object_context
38 39 40 |
# File 'common/jsonmodel.rb', line 38 def object_context @object_context end |
- (Object) warnings
Returns the value of attribute warnings
35 36 37 |
# File 'common/jsonmodel.rb', line 35 def warnings @warnings end |
Instance Method Details
- (Object) to_s
48 49 50 51 52 53 |
# File 'common/jsonmodel.rb', line 48 def to_s msg = { :errors => @errors } msg[:import_context] = @import_context unless @import_context.nil? msg[:object_context] = @object_context unless @object_context.nil? "#<:ValidationException: #{msg.inspect}>" end |