Sha256: fa87ca0d71d8e7813bc4cf29a9fe381442f3ebd3e4f7479cf82bada3be6a535b

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

require 'super_model/error/type'

class SuperModel
  class Error
    
    class InvalidPlurality < Error
      
      def self.check(object)
        raise self unless [:singular, :plural].include?(object)
      end
      
      def to_s
        '`plurality` must be either :singular or :plural'
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
super_model-0.0.1 lib/super_model/error/invalid_plurality.rb