Class: Threatinator::Model::Base
- Inherits:
-
Object
- Object
- Threatinator::Model::Base
- Includes:
- ActiveModel::Validations, Validations
- Defined in:
- lib/threatinator/model/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #validate! ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/threatinator/model/base.rb', line 12 def initialize validate! end |
Instance Method Details
#validate! ⇒ Object
16 17 18 19 20 |
# File 'lib/threatinator/model/base.rb', line 16 def validate! unless valid? raise Threatinator::Exceptions::InvalidAttributeError, errors..join("\n") end end |