class XML::Smart::QName
Public Class Methods
Source
# File lib/xml/smart_qname.rb, line 5 def initialize(element); @element = element; end
Public Instance Methods
Source
# File lib/xml/smart_qname.rb, line 28 def href @element.namespace ? @element.namespace.href : nil end
Source
# File lib/xml/smart_qname.rb, line 16 def prefix if @element.namespace if @element.namespace.prefix.nil? '' else @element.namespace.prefix end else nil end end
Source
# File lib/xml/smart_qname.rb, line 11 def to_s; (prefix.nil? || prefix == '' ? '' : prefix + ':') + @element.name; end