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.



94
95
96
97
# File 'lib/cimi/models/base.rb', line 94

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



100
101
102
# File 'lib/cimi/models/base.rb', line 100

def code
  400
end

#nameObject



104
105
106
# File 'lib/cimi/models/base.rb', line 104

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