Class: Psych::Visitors::Emitter
- Defined in:
- lib/psych/visitors/emitter.rb
Instance Attribute Summary
Attributes inherited from Visitor
Instance Method Summary collapse
-
#initialize(io) ⇒ Emitter
constructor
A new instance of Emitter.
- #visit_Psych_Nodes_Alias(o) ⇒ Object
- #visit_Psych_Nodes_Document(o) ⇒ Object
- #visit_Psych_Nodes_Mapping(o) ⇒ Object
- #visit_Psych_Nodes_Scalar(o) ⇒ Object
- #visit_Psych_Nodes_Sequence(o) ⇒ Object
- #visit_Psych_Nodes_Stream(o) ⇒ Object
Methods inherited from Visitor
Constructor Details
Instance Method Details
#visit_Psych_Nodes_Alias(o) ⇒ Object
36 37 38 |
# File 'lib/psych/visitors/emitter.rb', line 36 def visit_Psych_Nodes_Alias o @handler.alias o.anchor end |
#visit_Psych_Nodes_Document(o) ⇒ Object
14 15 16 17 18 |
# File 'lib/psych/visitors/emitter.rb', line 14 def visit_Psych_Nodes_Document o @handler.start_document o.version, o.tag_directives, o.implicit o.children.each { |c| accept c } @handler.end_document o.implicit_end end |
#visit_Psych_Nodes_Mapping(o) ⇒ Object
30 31 32 33 34 |
# File 'lib/psych/visitors/emitter.rb', line 30 def visit_Psych_Nodes_Mapping o @handler.start_mapping o.anchor, o.tag, o.implicit, o.style o.children.each { |c| accept c } @handler.end_mapping end |
#visit_Psych_Nodes_Scalar(o) ⇒ Object
20 21 22 |
# File 'lib/psych/visitors/emitter.rb', line 20 def visit_Psych_Nodes_Scalar o @handler.scalar o.value, o.anchor, o.tag, o.plain, o.quoted, o.style end |
#visit_Psych_Nodes_Sequence(o) ⇒ Object
24 25 26 27 28 |
# File 'lib/psych/visitors/emitter.rb', line 24 def visit_Psych_Nodes_Sequence o @handler.start_sequence o.anchor, o.tag, o.implicit, o.style o.children.each { |c| accept c } @handler.end_sequence end |
#visit_Psych_Nodes_Stream(o) ⇒ Object
8 9 10 11 12 |
# File 'lib/psych/visitors/emitter.rb', line 8 def visit_Psych_Nodes_Stream o @handler.start_stream o.encoding o.children.each { |c| accept c } @handler.end_stream end |