Class: Metrojobb::Model
- Inherits:
-
Object
- Object
- Metrojobb::Model
- Includes:
- ActiveModel::Model
- Defined in:
- lib/metrojobb/model.rb
Constant Summary collapse
- InvalidError =
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#to_xml! ⇒ Object
9 10 11 12 13 14 |
# File 'lib/metrojobb/model.rb', line 9 def to_xml! return to_xml if valid? = "#{model_name} has errors on: #{self.errors.keys.join(', ')}" raise(InvalidError, ) end |