Top Level Namespace
Defined Under Namespace
Modules: PropertyFile, REXML, SerializableToXml, Symphony, VORuby, XML, XMLUtilities Classes: Array, AtLeastTwoArray, Enumeration, FixedSizedHomogeneousArray, HomogeneousArray, Id, IdRef, MinimumSizedHomogeneousArray, RegexRestrictedString, String, TypedArray, Unit
Constant Summary collapse
- XSI_NAMESPACE =
OpenStruct.new(:uri => 'http://www.w3.org/2001/XMLSchema-instance', :prefix => 'xsi')
- NAMESPACES =
A hash mapping module names to XML namespaces.
{ 'VORuby::STC::V1_10::Coords' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/STC/STCcoords/v1.10', :prefix => 'crd'), 'VORuby::STC::V1_10::Region' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/STC/STCregion/v1.10', :prefix => 'reg'), 'VORuby::STC::V1_10::STC' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/STC/stc-v1.10.xsd', :prefix => 'stc'), 'VORuby::STC::V1_30' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/STC/stc-v1.30.xsd', :prefix => 'stc'), 'VORuby::XLink::V1_2' => OpenStruct.new(:uri => 'http://www.w3.org/1999/xlink', :prefix => 'xlink'), 'VORuby::ADQL::V1_0' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/ADQL/v1.0', :prefix => 'adq'), 'VORuby::VOEvent::V1_1' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/VOEvent/v1.1', :prefix => 'voe'), 'VORuby::VOResource::V0_10' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/VOResource/v0.10', :prefix => 'vr'), 'VORuby::VORegistry::V0_3' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/VORegistry/v0.3', :prefix => 'vg'), 'VORuby::VODataService::V0_5' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/VODataService/v0.5', :prefix => 'vs'), 'VORuby::ConeSearch::V0_3' => OpenStruct.new(:uri => 'http://www.ivoa.net/xml/ConeSearch/v0.3', :prefix => 'cs') }
Instance Method Summary collapse
-
#raise_argument_required_error(msg) ⇒ Object
Raises an ArgumentError with the specified root message.
-
#raise_type_mismatch_error(var, expected_klass) ⇒ Object
Raises a TypeError if the given variable isn’t of the expected class.
Methods included from XMLUtilities
#collapse_namespaces, #current_module, #element_from, #element_name_from, #find_class_with_name, #find_classes_of_type, #find_elements, #obj_ns, #xml_to_obj, #xpath_for
Instance Method Details
#raise_argument_required_error(msg) ⇒ Object
Raises an ArgumentError with the specified root message.
21 22 23 |
# File 'lib/voruby/misc.rb', line 21 def raise_argument_required_error(msg) raise ArgumentError, "#{msg} required" end |
#raise_type_mismatch_error(var, expected_klass) ⇒ Object
Raises a TypeError if the given variable isn’t of the expected class.
26 27 28 |
# File 'lib/voruby/misc.rb', line 26 def raise_type_mismatch_error(var, expected_klass) raise TypeError, "invalid type #{var.class} for #{var.inspect}, expected #{expected_klass}" if !var.is_a?(expected_klass) end |