In Files

  • xsd/qname.rb

Class/Module Index [+]

Quicksearch

XSD::QName

Attributes

name[RW]
namespace[RW]
source[RW]

Public Class Methods

new(namespace = nil, name = nil) click to toggle source
 
               # File xsd/qname.rb, line 17
def initialize(namespace = nil, name = nil)
  @namespace = namespace
  @name = name
  @source = nil
end
            

Public Instance Methods

==(rhs) click to toggle source
 
               # File xsd/qname.rb, line 43
def ==(rhs)
  !rhs.nil? and @namespace == rhs.namespace and @name == rhs.name
end
            
===(rhs) click to toggle source
 
               # File xsd/qname.rb, line 47
def ===(rhs)
  (self == rhs)
end
            
dump() click to toggle source
 
               # File xsd/qname.rb, line 27
def dump
  ns = @namespace.nil? ? 'nil' : @namespace.dump
  name = @name.nil? ? 'nil' : @name.dump
  "XSD::QName.new(#{ns}, #{name})"
end
            
dup_name(name) click to toggle source
 
               # File xsd/qname.rb, line 23
def dup_name(name)
  XSD::QName.new(@namespace, name)
end
            
eql?(rhs) click to toggle source
 
               # File xsd/qname.rb, line 51
def eql?(rhs)
  (self == rhs)
end
            
hash() click to toggle source
 
               # File xsd/qname.rb, line 55
def hash
  @namespace.hash ^ @name.hash
end
            
inspect() click to toggle source
 
               # File xsd/qname.rb, line 63
def inspect
  sprintf("#<%s:0x%x %s>", self.class.name, __id__,
    "{#{ namespace }}#{ name }")
end
            
match(rhs) click to toggle source
 
               # File xsd/qname.rb, line 33
def match(rhs)
  if rhs.namespace and (rhs.namespace != @namespace)
    return false
  end
  if rhs.name and (rhs.name != @name)
    return false
  end
  true
end
            
parse(str) click to toggle source
 
               # File xsd/qname.rb, line 69
def parse(str)
  NormalizedNameRegexp =~ str
  self.new($1, $2)
end
            
to_s() click to toggle source
 
               # File xsd/qname.rb, line 59
def to_s
  "{#{ namespace }}#{ name }"
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus