Exception: QueryBuilder::Core::AttributeError

Inherits:
KeyError
  • Object
show all
Defined in:
lib/query_builder/core/attribute_error.rb

Overview

The exception to be raised by AST nodes’ initializers

Instance Method Summary collapse

Constructor Details

#initialize(problem, list) ⇒ AttributeError

Initializes the error with problem definition and the list of attributes

Parameters:

  • problem (#to_s)
  • list (Array<#to_s>)


14
15
16
17
18
19
20
21
# File 'lib/query_builder/core/attribute_error.rb', line 14

def initialize(problem, list)
  super [
    "#{problem} attribute",
    (list.one? ? ": " : "s: "),
    list.map { |item| ":#{item}" }.join(", ")
  ].join
  IceNine.deep_freeze(self)
end