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 10Hash.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 4
def accept target visit target end
#visit(target) (private)
[ GitHub ]# File 'ext/psych/lib/psych/visitors/visitor.rb', line 14
def visit target send DISPATCH[target.class], target end