Maintenance of Ruby 2.0.0 ended on February 24, 2016. Read more

In Files

  • psych/lib/psych/visitors/json_tree.rb

Parent

Methods

Psych::Visitors::JSONTree

Public Class Methods

new(options = {}) click to toggle source
 
               # File psych/lib/psych/visitors/json_tree.rb, line 8
def initialize options = {}, emitter = Psych::JSON::TreeBuilder.new
  super
end
            

Public Instance Methods

accept(target) click to toggle source
 
               # File psych/lib/psych/visitors/json_tree.rb, line 12
def accept target
  if target.respond_to?(:encode_with)
    dump_coder target
  else
    send(@dispatch_cache[target.class], target)
  end
end