AlkantarClanX12

Your IP : 18.217.118.7


Current Path : /proc/thread-self/root/opt/alt/ruby31/share/gems/gems/psych-4.0.4/lib/psych/json/
Upload File :
Current File : //proc/thread-self/root/opt/alt/ruby31/share/gems/gems/psych-4.0.4/lib/psych/json/ruby_events.rb

# frozen_string_literal: true
module Psych
  module JSON
    module RubyEvents # :nodoc:
      def visit_Time o
        formatted = format_time o
        @emitter.scalar formatted, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED
      end

      def visit_DateTime o
        visit_Time o.to_time
      end

      def visit_String o
        @emitter.scalar o.to_s, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED
      end
      alias :visit_Symbol :visit_String
    end
  end
end