Exception: SuperModel::Error::InvalidPlurality
- Inherits:
-
SuperModel::Error
- Object
- StandardError
- SuperModel::Error
- SuperModel::Error::InvalidPlurality
- Defined in:
- lib/super_model/error/invalid_plurality.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.check(object) ⇒ Object
8 9 10 |
# File 'lib/super_model/error/invalid_plurality.rb', line 8 def self.check(object) raise self unless [:singular, :plural].include?(object) end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/super_model/error/invalid_plurality.rb', line 12 def to_s '`plurality` must be either :singular or :plural' end |