Exception: Pursuit::AggregateModifierRequired

Inherits:
QueryError show all
Defined in:
lib/pursuit/aggregate_modifier_required.rb

Overview

Raised when an attribute that must be used with an aggregate modifier is used without one.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attribute) ⇒ AggregateModifierRequired

Creates a new error instance.

Parameters:

  • attribute (Symbol)

    The name of the attribute which must be used with an aggregate modifier.



15
16
17
18
# File 'lib/pursuit/aggregate_modifier_required.rb', line 15

def initialize(attribute)
  @attribute = attribute
  super("'#{attribute}' must be used with an aggregate modifier")
end

Instance Attribute Details

#attributeSymbol (readonly)

Returns The name of the attribute which must be used with an aggregate modifier.

Returns:

  • (Symbol)

    The name of the attribute which must be used with an aggregate modifier.



9
10
11
# File 'lib/pursuit/aggregate_modifier_required.rb', line 9

def attribute
  @attribute
end