Class: Psych::Visitors::DepthFirst
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Visitor
|
|
Instance Chain:
self,
Visitor
|
|
Inherits: |
Psych::Visitors::Visitor
|
Defined in: | ext/psych/lib/psych/visitors/depth_first.rb |
Class Method Summary
Instance Method Summary
- #nary(o) (also: #visit_Psych_Nodes_Stream, #visit_Psych_Nodes_Document, #visit_Psych_Nodes_Sequence, #visit_Psych_Nodes_Mapping) private
- #terminal(o) (also: #visit_Psych_Nodes_Scalar, #visit_Psych_Nodes_Alias) private
-
#visit_Psych_Nodes_Alias(o)
private
Alias for #terminal.
-
#visit_Psych_Nodes_Document(o)
private
Alias for #nary.
-
#visit_Psych_Nodes_Mapping(o)
private
Alias for #nary.
-
#visit_Psych_Nodes_Scalar(o)
private
Alias for #terminal.
-
#visit_Psych_Nodes_Sequence(o)
private
Alias for #nary.
-
#visit_Psych_Nodes_Stream(o)
private
Alias for #nary.
Visitor
- Inherited
Constructor Details
.new(block) ⇒ DepthFirst
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 5
def initialize block @block = block end
Instance Method Details
#nary(o) (private) Also known as: #visit_Psych_Nodes_Stream, #visit_Psych_Nodes_Document, #visit_Psych_Nodes_Sequence, #visit_Psych_Nodes_Mapping
[ GitHub ]# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 11
def nary o o.children.each { |x| visit x } @block.call o end
#terminal(o) (private) Also known as: #visit_Psych_Nodes_Scalar, #visit_Psych_Nodes_Alias
[ GitHub ]# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 20
def terminal o @block.call o end
#visit_Psych_Nodes_Alias(o) (private)
Alias for #terminal.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 24
alias :visit_Psych_Nodes_Alias :terminal
#visit_Psych_Nodes_Document(o) (private)
Alias for #nary.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 16
alias :visit_Psych_Nodes_Document :nary
#visit_Psych_Nodes_Mapping(o) (private)
Alias for #nary.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 18
alias :visit_Psych_Nodes_Mapping :nary
#visit_Psych_Nodes_Scalar(o) (private)
Alias for #terminal.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 23
alias :visit_Psych_Nodes_Scalar :terminal
#visit_Psych_Nodes_Sequence(o) (private)
Alias for #nary.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 17
alias :visit_Psych_Nodes_Sequence :nary
#visit_Psych_Nodes_Stream(o) (private)
Alias for #nary.
# File 'ext/psych/lib/psych/visitors/depth_first.rb', line 15
alias :visit_Psych_Nodes_Stream :nary