Class: REXML::Instruction
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Child
|
|
Instance Chain:
|
|
Inherits: |
REXML::Child
|
Defined in: | lib/rexml/instruction.rb |
Overview
Represents an XML Instruction; IE, <? … ?> TODO: Add parent arg (3rd arg) to constructor
Constant Summary
-
START =
# File 'lib/rexml/instruction.rb', line 9'<\?'
-
STOP =
# File 'lib/rexml/instruction.rb', line 10'\?>'
Class Method Summary
-
.new(target, content = nil) ⇒ Instruction
constructor
Constructs a new
Instruction
the target of this instruction is set to this.
Child - Inherited
.new | Constructor. |
Instance Attribute Summary
-
#content
rw
target is the “name” of the Instruction; IE, the “tag” in <?tag …?> content is everything else.
-
#target
rw
target is the “name” of the Instruction; IE, the “tag” in <?tag …?> content is everything else.
Child - Inherited
#next_sibling | Alias for Node#next_sibling_node. |
#next_sibling= | Sets the next sibling of this child. |
#parent | The Parent of this object. |
#parent= | Sets the parent of this child to the supplied argument. |
#previous_sibling | Alias for Node#previous_sibling_node. |
#previous_sibling= | Sets the previous sibling of this child. |
Node - Included
Instance Method Summary
-
#==(other) ⇒ Object
of the other matches the target and content of this object.
- #clone
- #inspect
- #node_type
-
#write(writer, indent = -1,, transitive = false, ie_hack = false)
DEPRECATED See the rexml/formatters package.
Child - Inherited
#bytes | This doesn't yet handle encodings. |
#document |
|
#remove | Removes this child from the parent. |
#replace_with | Replaces this object with another object. |
Node - Included
#each_recursive | Visit all subnodes of |
#find_first_recursive | Find (and return) first subnode (recursively) for which the block evaluates to true. |
#indent, | |
#index_in_parent | Returns the position that |
#next_sibling_node, #previous_sibling_node, | |
#to_s |
|
Constructor Details
.new(target, content = nil) ⇒ Instruction
Constructs a new Instruction
the target of this instruction is set to this. If an Instruction
, then the Instruction
is shallowly cloned (target and content are copied). If a Source, then the source is scanned and parsed for an Instruction
declaration. be a Parent if the target argument is a Source. Otherwise, this String is set as the content of this instruction.
Instance Attribute Details
#content (rw)
target is the “name” of the Instruction; IE, the “tag” in <?tag …?> content is everything else.
# File 'lib/rexml/instruction.rb', line 14
attr_accessor :target, :content
#target (rw)
target is the “name” of the Instruction; IE, the “tag” in <?tag …?> content is everything else.
# File 'lib/rexml/instruction.rb', line 14
attr_accessor :target, :content
Instance Method Details
#==(other) ⇒ Object
of the other matches the target and content of this object.
#clone
[ GitHub ]# File 'lib/rexml/instruction.rb', line 38
def clone Instruction.new self end
#inspect
[ GitHub ]# File 'lib/rexml/instruction.rb', line 67
def inspect "<?p-i #{target} ...?>" end
#node_type
[ GitHub ]# File 'lib/rexml/instruction.rb', line 63
def node_type :processing_instruction end
#write(writer, indent = -1,, transitive = false, ie_hack = false)
DEPRECATED
See the rexml/formatters package