Sha256: 5963b731cf30cc28bc21b125d80280f0c2d0165a495ff6234dc0a95d6accd8f2

Contents?: true

Size: 508 Bytes

Versions: 2

Compression:

Stored size: 508 Bytes

Contents

# frozen_string_literal: true

module Pursuit
  # Raised when an attribute cannot be found.
  #
  class AttributeNotFound < QueryError
    # @return [Symbol] The name of the attribute which could not be found.
    #
    attr_reader :attribute

    # Creates a new error instance.
    #
    # @param attribute [Symbol] The name of the attribute which could not be found.
    #
    def initialize(attribute)
      @attribute = attribute
      super("'#{attribute}' is not a valid attribute")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pursuit-1.1.0 lib/pursuit/attribute_not_found.rb
pursuit-1.0.1 lib/pursuit/attribute_not_found.rb