Exception: XQuery::QuerySuperclassChanged

Inherits:
StandardError
  • Object
show all
Defined in:
lib/xquery/errors.rb

Overview

raised when superclass of query changed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result, expectation) ⇒ QuerySuperclassChanged

Returns a new instance of QuerySuperclassChanged.

Parameters:

  • result (Object)

    query on which constraint failed

  • expectation (Class)

    expected superclass



12
13
14
15
16
# File 'lib/xquery/errors.rb', line 12

def initialize(result, expectation)
  @result = result
  @expectation = expectation
  super("Expected #{result.inspect} to be an instance of #{expectation}")
end

Instance Attribute Details

#expectationObject (readonly)

expected superclass of query



8
9
10
# File 'lib/xquery/errors.rb', line 8

def expectation
  @expectation
end

#resultObject (readonly)

query on which constraint failed



5
6
7
# File 'lib/xquery/errors.rb', line 5

def result
  @result
end