Class: Psych::Visitors::Visitor
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | ext/psych/psych_yaml_tree.c, ext/psych/psych_to_ruby.c, ext/psych/lib/psych/visitors/visitor.rb |
Constant Summary
-
DISPATCH =
# File 'ext/psych/lib/psych/visitors/visitor.rb', line 11Hash.new do |hash, klass| hash[klass] = "visit_#{klass.name.gsub('::', '_')}" end
Instance Method Summary
- #accept(target)
- #visit(target) private
Instance Method Details
#accept(target)
[ GitHub ]# File 'ext/psych/lib/psych/visitors/visitor.rb', line 5
def accept target visit target end
#visit(target) (private)
[ GitHub ]# File 'ext/psych/lib/psych/visitors/visitor.rb', line 15
def visit target send DISPATCH[target.class], target end