class Ox::Instruct

An Instruct represents a processing instruction of an XML document. It has a target, attributes, and a value or content. The content will be all characters with the exception of the target. If the content follows a regular attribute format then the attributes will be set to the parsed values. If it does not follow the attribute formate then the attributes will be empty.

Attributes

content[RW]

The content of the processing instruction.

Public Class Methods

new(name) click to toggle source

Creates a new Instruct with the specified name.

Calls superclass method
# File lib/ox/instruct.rb, line 16
def initialize(name)
  super
  @attributes = nil
  @content = nil
end

Public Instance Methods

==(other)
Alias for: eql?
eql?(other) click to toggle source

Returns true if this Object and other are of the same type and have the equivalent value and the equivalent elements otherwise false is returned.

  • other [Object] Object compare self to.

return [Boolean] true if both Objects are equivalent, otherwise false.

Calls superclass method
# File lib/ox/instruct.rb, line 27
def eql?(other)
  return false unless super(other)
  return false unless self.attributes == other.attributes
  return false unless self.content == other.content
  true
end
Also aliased as: ==