class XML::Smart::Dom::Namespace

Public Class Methods

new(ns) click to toggle source
# File lib/xml/smart_domnamespace.rb, line 6
def initialize(ns)
  @ns = ns
end

Public Instance Methods

==(other) click to toggle source
# File lib/xml/smart_domnamespace.rb, line 23
def ==(other)
  return false unless other
  return false unless other.respond_to?(:to_s)
  to_s == other.to_s
end
===(cls) click to toggle source
# File lib/xml/smart_domnamespace.rb, line 10
def ===(cls); self.is_a? cls; end
href() click to toggle source
# File lib/xml/smart_domnamespace.rb, line 12
def href; @ns.href; end
Also aliased as: to_s
prefix() click to toggle source
# File lib/xml/smart_domnamespace.rb, line 15
def prefix
  if @ns.prefix
    @ns.prefix
  else
    @ns.document.custom_namespace_prefixes.find{|k,v| v == @ns.href}[0]
  end
end
to_s()
Alias for: href