Class: Saxon::XdmAtomicValue
- Inherits:
-
Object
- Object
- Saxon::XdmAtomicValue
- Defined in:
- lib/saxon/xdm_atomic_value.rb
Overview
An XPath Data Model Node object, representing an XML document, or an element or one of the other node chunks in the XDM.
Class Method Summary collapse
-
.create(value) ⇒ Saxon::XdmAtomicValue
convert a single Ruby value into an XdmAtomicValue.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
compares two XdmAtomicValues using the underlying Saxon and XDM comparision rules.
- #hash ⇒ Object
-
#initialize(s9_xdm_atomic_value) ⇒ XdmAtomicValue
constructor
private
A new instance of XdmAtomicValue.
-
#to_java ⇒ Saxon::S9API::XdmAtomicValue
The underlying Saxon Java XDM atomic value object.
-
#type_name ⇒ Saxon::QName
Return a QName representing the type of the value.
Constructor Details
#initialize(s9_xdm_atomic_value) ⇒ XdmAtomicValue
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of XdmAtomicValue.
18 19 20 |
# File 'lib/saxon/xdm_atomic_value.rb', line 18 def initialize(s9_xdm_atomic_value) @s9_xdm_atomic_value = s9_xdm_atomic_value end |
Class Method Details
.create(value) ⇒ Saxon::XdmAtomicValue
convert a single Ruby value into an XdmAtomicValue
10 11 12 |
# File 'lib/saxon/xdm_atomic_value.rb', line 10 def self.create(value) new(Saxon::S9API::XdmAtomicValue.new(value)) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
compares two Saxon::XdmAtomicValues using the underlying Saxon and XDM comparision rules
37 38 39 40 |
# File 'lib/saxon/xdm_atomic_value.rb', line 37 def ==(other) return false unless other.is_a?(XdmAtomicValue) s9_xdm_atomic_value.equals(other.to_java) end |
#hash ⇒ Object
44 45 46 |
# File 'lib/saxon/xdm_atomic_value.rb', line 44 def hash @hash ||= s9_xdm_atomic_value.hashCode end |
#to_java ⇒ Saxon::S9API::XdmAtomicValue
Returns The underlying Saxon Java XDM atomic value object.
30 31 32 |
# File 'lib/saxon/xdm_atomic_value.rb', line 30 def to_java s9_xdm_atomic_value end |
#type_name ⇒ Saxon::QName
Return a QName representing the type of the value
25 26 27 |
# File 'lib/saxon/xdm_atomic_value.rb', line 25 def type_name @type_name ||= Saxon::QName.new(s9_xdm_atomic_value.getTypeName) end |