class LibXML::XML::Attr
def child?
Returns whether this attribute has child attributes.
attr.child? -> (true|false)
call-seq:
def child? not self.children.nil? end
def doc?
Determine whether this attribute is associated with an
attr.doc? -> (true|false)
call-seq:
def doc? not self.doc.nil? end
def each_sibling(&blk)
def each_sibling(&blk) siblings(self,&blk) end
def last?
attr.last? -> (true|false)
call-seq:
def last? self.last.nil? end
def namespaces
which is used to access the namespaces
Returns this node's XML::Namespaces object,
attr.namespacess -> XML::Namespaces
call-seq:
def namespaces @namespaces ||= XML::Namespaces.new(self) end
def next?
attr.next? -> (true|false)
call-seq:
def next? not self.next.nil? end
def node_type_name
def node_type_name if node_type == Node::ATTRIBUTE_NODE 'attribute' else raise(UnknownType, "Unknown node type: %n", node.node_type); end end
def ns?
Determine whether this attribute has an associated
attr.ns? -> (true|false)
call-seq:
def ns? not self.ns.nil? end
def parent?
attr.parent? -> (true|false)
call-seq:
def parent? not self.parent.nil? end
def prev?
attr.prev? -> (true|false)
call-seq:
def prev? not self.prev.nil? end
def siblings(node, &blk)
def siblings(node, &blk) if n = node loop do blk.call(n) break unless n = n.next end end end
def to_a
def to_a inject([]) do |ary,a| ary << [a.name, a.value] ary end end
def to_h
def to_h inject({}) do |h,a| h[a.name] = a.value h end end
def to_s
def to_s "#{name} = #{value}" end