Class: Psych::Handlers::DocumentStream
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Psych::TreeBuilder
|
Defined in: | ext/psych/lib/psych/handlers/document_stream.rb |
Constant Summary
::Psych::Handler
- Inherited
Class Method Summary
- .new(&block) ⇒ DocumentStream constructor
::Psych::TreeBuilder
- Inherited
.new | Create a new |
Instance Attribute Summary
::Psych::TreeBuilder
- Inherited
#root | Returns the root node for the built tree. |
::Psych::Handler
- Inherited
#streaming? | Is this handler a streaming handler? |
Instance Method Summary
::Psych::TreeBuilder
- Inherited
#alias, | |
#end_document | Handles end_document events with |
#end_stream, #event_location, #scalar, | |
#start_document | Handles start_document events with |
#start_stream, #pop, #push, #set_end_location, #set_location, #set_start_location |
::Psych::Handler
- Inherited
#alias | Called when an alias is found to |
#empty | Called when an empty event happens. |
#end_document | Called with the document ends. |
#end_mapping | Called when a map ends. |
#end_sequence | Called when a sequence ends. |
#end_stream | Called when the YAML stream ends. |
#event_location | Called before each event with line/column information. |
#scalar | Called when a scalar |
#start_document | Called when the document starts with the declared |
#start_mapping | Called when a map starts. |
#start_sequence | Called when a sequence is started. |
#start_stream | Called with |
Constructor Details
.new(&block) ⇒ DocumentStream
# File 'ext/psych/lib/psych/handlers/document_stream.rb', line 7
def initialize &block super @block = block end
Instance Method Details
#end_document(implicit_end = !streaming?)
[ GitHub ]# File 'ext/psych/lib/psych/handlers/document_stream.rb', line 17
def end_document implicit_end = !streaming? @last.implicit_end = implicit_end @block.call pop end