Sha256: f635cfa3490ad7318b2fb6f0f5c9e6aff050893a852f7fa310e599ebffcded49

Contents?: true

Size: 358 Bytes

Versions: 9

Compression:

Stored size: 358 Bytes

Contents

module Related
  class RelatedException < RuntimeError; end
  class NotFound < RelatedException; end
  class InvalidQuery < RelatedException; end
  class ValidationsFailed < RelatedException
    attr_reader :object
    def initialize(object)
      @object = object
      errors = @object.errors.full_messages.to_sentence
      super(errors)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
related-0.6.6 lib/related/exceptions.rb
related-0.6.5 lib/related/exceptions.rb
related-0.6.4 lib/related/exceptions.rb
related-0.6.3 lib/related/exceptions.rb
related-0.6.2 lib/related/exceptions.rb
related-0.6.1 lib/related/exceptions.rb
related-0.6.0 lib/related/exceptions.rb
related-0.5.0 lib/related/exceptions.rb
related-0.4.0 lib/related/exceptions.rb