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
- #visit_DateTime(o)
- #visit_String(o) (also: #visit_Symbol)
-
#visit_Symbol(o)
Alias for #visit_String.
- #visit_Time(o)
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.
# 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