# class Child

Includes Node

A Child object is something contained by a parent, and this class contains methods to support that. Most user code will not use this class directly.

## Attributes

- parent

## Methods

- bytes
- document
- initialize
- remove
- replace_with

## Attributes

parent (accessor)

## Aliases

### next_sibling

is a synonym for

### next_sibling_node

### previous_sibling

is a synonym for

### previous_sibling_node

## Methods

### bytes

This doesn't yet handle encodings

### document

Returns the document this child belongs to, or nil if this child belongs to no document

### initialize

#### Arguments

parent<nil>
if supplied, the parent of this child will be set to the supplied value, and self will be added to the parent

Constructor. Any inheritors of this class should call super to make sure this method is called.

### remove

Returns self

Removes this child from the parent.

### replace_with

#### Arguments

child
Returns self

Replaces this object with another object. Basically, calls Parent.replace_child