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



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

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

Instance Attribute Details

#expectationClass

expected superclass of query

Returns:

  • (Class)

    the current value of expectation



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

def expectation
  @expectation
end

#resultObject

query on which constraint failed

Returns:

  • (Object)

    the current value of result



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

def result
  @result
end