Exception: CIMI::Model::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cimi/models/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(attr_list, format) ⇒ ValidationError

Returns a new instance of ValidationError.



92
93
94
95
# File 'lib/cimi/models/base.rb', line 92

def initialize(attr_list, format)
  @lst = attr_list
  super("Required attributes not set: #{name}")
end

Instance Method Details

#codeObject

Report the ValidationError as HTTP 400 - Bad Request



98
99
100
# File 'lib/cimi/models/base.rb', line 98

def code
  400
end

#nameObject



102
103
104
# File 'lib/cimi/models/base.rb', line 102

def name
  @lst.join(',')
end