123456789_123456789_123456789_123456789_123456789_

Module: Psych::JSON::RubyEvents

Do not use. This module is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: ext/psych/lib/psych/json/ruby_events.rb

Instance Method Summary

Instance Method Details

#visit_DateTime(o)

[ GitHub ]

  
# File 'ext/psych/lib/psych/json/ruby_events.rb', line 10

def visit_DateTime o
  visit_Time o.to_time
end

#visit_String(o) Also known as: #visit_Symbol

[ GitHub ]

  
# File 'ext/psych/lib/psych/json/ruby_events.rb', line 14

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

#visit_Symbol(o)

Alias for #visit_String.

[ GitHub ]

  
# File 'ext/psych/lib/psych/json/ruby_events.rb', line 17

alias :visit_Symbol :visit_String

#visit_Time(o)

[ GitHub ]

  
# File 'ext/psych/lib/psych/json/ruby_events.rb', line 5

def visit_Time o
  formatted = format_time o
  @emitter.scalar formatted, nil, nil, false, true, Nodes::Scalar::DOUBLE_QUOTED
end