Sha256: 68008b34714ad93f1de2f4bc21bf3cb86948a3325f75aa13c961d948771530c8

Contents?: true

Size: 489 Bytes

Versions: 17

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: false
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

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
psych-3.0.0.beta2-java lib/psych/json/ruby_events.rb
psych-3.0.0.beta2 lib/psych/json/ruby_events.rb
psych-2.2.4-java lib/psych/json/ruby_events.rb
psych-2.2.4 lib/psych/json/ruby_events.rb
psych-2.2.3-java lib/psych/json/ruby_events.rb
psych-2.2.3 lib/psych/json/ruby_events.rb
ruby-compiler-0.1.1 vendor/ruby/ext/psych/lib/psych/json/ruby_events.rb
psych-2.2.2-java lib/psych/json/ruby_events.rb
psych-2.2.2 lib/psych/json/ruby_events.rb
psych-2.2.1-java lib/psych/json/ruby_events.rb
psych-2.2.1 lib/psych/json/ruby_events.rb
psych-2.2.0-java lib/psych/json/ruby_events.rb
psych-2.2.0 lib/psych/json/ruby_events.rb
psych-2.1.1-java lib/psych/json/ruby_events.rb
psych-2.1.1 lib/psych/json/ruby_events.rb
psych-2.1.0-java lib/psych/json/ruby_events.rb
psych-2.1.0 lib/psych/json/ruby_events.rb