That's exactly what block processors are designed to do. They can insert any set of nodes into to the AST (the document model).
Here's an example:
wrapper = create_open_block parent, [], {}
wrapper << (create_open_block wrapper, reader.lines, attrs)
wrapper
(You have to decide where you want the attributes to go, but that's the general idea
Here's the APIs to be looking at:
Note that `create_open_block` is just a shorthand for `create_block parent, :open, ...`
-Dan