Sha256: 30e1caabf64b12fcf61110408d8b92198dd1bff1ad481cd18ee3e8fddfb34817

Contents?: true

Size: 348 Bytes

Versions: 4

Compression:

Stored size: 348 Bytes

Contents

module CleanModel

  class Error < StandardError
  end

  class InvalidTypeAssignment < Error
    def initialize(attribute, value)
      super "#{value} is not valid for #{attribute}"
    end
  end

  class UndefinedPersistenceMethod < Error
    def initialize(klass, method)
      super "#{klass} must define method [#{method}]"
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clean_model-0.0.9 lib/clean_model/exceptions.rb
clean_model-0.0.8 lib/clean_model/exceptions.rb
clean_model-0.0.7 lib/clean_model/exceptions.rb
clean_model-0.0.6 lib/clean_model/exceptions.rb