Sha256: 50352590b7bfd7be29f0eed899ef2071896ba90a60882233a12ad5702271d29a

Contents?: true

Size: 558 Bytes

Versions: 8

Compression:

Stored size: 558 Bytes

Contents

class Anima

  # Abstract base class for anima errors
  class Error < RuntimeError
    include AbstractType

    # Initialize object
    #
    # @param [Class] model
    # @param [Enumerable<Symbol>] names
    #
    # @return [undefined]
    #
    # @api private
    #
    def initialize(model, names)
      super("#{self.class.name.split('::').last} attribute(s) #{names.inspect} for #{model.name}")
    end

    # Error for unknown attributes
    class Unknown < self
    end

    # Error for missing attributes
    class Missing < self
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
anima-0.1.1 lib/anima/error.rb
anima-0.1.0 lib/anima/error.rb
anima-0.0.7 lib/anima/error.rb
anima-0.0.6 lib/anima/error.rb
anima-0.0.5 lib/anima/error.rb
anima-0.0.4 lib/anima/error.rb
anima-0.0.3 lib/anima/error.rb
anima-0.0.2 lib/anima/error.rb