Class: VCDOM::XPath::XPathResult

Inherits:
Object
  • Object
show all
Defined in:
lib/vcdom/xpath/xpath_result.rb,
lib/vcdom/xpath/xpath_result.rb

Defined Under Namespace

Classes: ResultBoolean, ResultNodesSnapshot, ResultNumber, ResultSingleNode, ResultString

Constant Summary collapse

ANY_TYPE =
:any_type
NUMBER_TYPE =
:number_type
STRING_TYPE =
:string_type
BOOLEAN_TYPE =
:boolean_type
UNORDERED_NODE_ITERATOR_TYPE =
:unordered_node_iterator_type
ORDERED_NODE_ITERATOR_TYPE =
:ordered_node_iterator_type
UNORDERED_NODE_SNAPSHOT_TYPE =
:unordered_node_snapshot_type
ORDERED_NODE_SNAPSHOT_TYPE =
:ordered_node_snapshot_type
ANY_UNORDERED_NODE_TYPE =
:any_unordered_node_type
FIRST_ORDERED_NODE_TYPE =
:first_ordered_node_type

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ XPathResult

:nodoc:



55
56
57
# File 'lib/vcdom/xpath/xpath_result.rb', line 55

def initialize( value ) # :nodoc:
  @value = value
end

Instance Method Details

#boolean_valueObject

Raises:



40
41
42
# File 'lib/vcdom/xpath/xpath_result.rb', line 40

def boolean_value
  raise XPathException.new( XPathException::TYPE_ERR, "result type is not STRING_TYPE" )
end

#invalid_iterator_stateObject

Signifies that the iterator has become invalid. True if resultType is UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE and the document has been modified since this result was returned.



25
26
27
# File 'lib/vcdom/xpath/xpath_result.rb', line 25

def invalid_iterator_state
  false
end

#iterate_nextObject

Raises:



51
52
53
54
# File 'lib/vcdom/xpath/xpath_result.rb', line 51

def iterate_next()
  raise XPathException.new( XPathException::TYPE_ERR,
        "result type is not UNORDERED_NODE_ITERATOR_TYPE or ORDERED_NODE_ITERATOR_TYPE" )
end

#number_valueObject

raises(XPathException) on retrieval

Raises:



34
35
36
# File 'lib/vcdom/xpath/xpath_result.rb', line 34

def number_value
  raise XPathException.new( XPathException::TYPE_ERR, "result type is not NUMBER_TYPE" )
end

#result_typeObject



20
21
22
# File 'lib/vcdom/xpath/xpath_result.rb', line 20

def result_type
  raise "INTERNAL ERROR"
end

#single_node_valueObject

Raises:



43
44
45
46
# File 'lib/vcdom/xpath/xpath_result.rb', line 43

def single_node_value
  raise XPathException.new( XPathException::TYPE_ERR, 
        "result type is not ANY_UNORDERED_NODE_TYPE or FIRST_ORDERED_NODE_TYPE" )
end

#snapshot_item(index) ⇒ Object

Raises:



47
48
49
50
# File 'lib/vcdom/xpath/xpath_result.rb', line 47

def snapshot_item( index )
  raise XPathException.new( XPathException::TYPE_ERR,
        "result type is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE" )
end

#snapshot_lengthObject

Raises:



28
29
30
31
# File 'lib/vcdom/xpath/xpath_result.rb', line 28

def snapshot_length
  raise XPathException.new( XPathException::TYPE_ERR, 
        "result type is not UNORDERED_NODE_SNAPSHOT_TYPE or ORDERED_NODE_SNAPSHOT_TYPE" )
end

#string_valueObject

Raises:



37
38
39
# File 'lib/vcdom/xpath/xpath_result.rb', line 37

def string_value
  raise XPathException.new( XPathException::TYPE_ERR, "result type is not STRING_TYPE" )
end