Class: Psych::Visitors::Visitor

Inherits:
Object
  • Object
show all
Defined in:
lib/psych/visitors/visitor.rb,
psych_to_ruby.c,
psych_yaml_tree.c

Direct Known Subclasses

DepthFirst, Emitter, ToRuby, YAMLTree

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dispatch_cacheObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
# File 'lib/psych/visitors/visitor.rb', line 12

def self.dispatch_cache
  Hash.new do |hash, klass|
    hash[klass] = :"visit_#{klass.name.gsub('::', '_')}"
  end.compare_by_identity
end

Instance Method Details

#accept(target) ⇒ Object



5
6
7
# File 'lib/psych/visitors/visitor.rb', line 5

def accept target
  visit target
end