Class
Constants
No documentation available
Class Methods
ext/psych/lib/psych/visitors/visitor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/ext/psych/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
@api private
Instance Methods
ext/psych/lib/psych/visitors/visitor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/ext/psych/lib/psych/visitors/visitor.rb, line 5
def accept target
visit target
end
No documentation available
#
ext/psych/lib/psych/visitors/visitor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/ext/psych/lib/psych/visitors/visitor.rb, line 19
def dispatch
@dispatch_cache ||= (Ractor.current[:Psych_Visitors_Visitor] ||= Visitor.dispatch_cache)
end
No documentation available
ext/psych/lib/psych/visitors/visitor.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/ext/psych/lib/psych/visitors/visitor.rb, line 29
def visit target
send dispatch[target.class], target
end
No documentation available