Class: Psych::JSON::Stream

Inherits:
Stream show all
Defined in:
lib/psych/json/stream.rb

Defined Under Namespace

Classes: Emitter

Instance Attribute Summary

Attributes inherited from Visitors::Visitor

#finished, #started

Instance Method Summary collapse

Methods inherited from Stream

#initialize, #start

Methods inherited from Visitors::YAMLTree

#accept, #finish, #initialize, #push, #start, #tree, #visit_Array, #visit_Class, #visit_Complex, #visit_DateTime, #visit_Exception, #visit_Float, #visit_Hash, #visit_Integer, #visit_NilClass, #visit_Object, #visit_Psych_Omap, #visit_Psych_Set, #visit_Range, #visit_Rational, #visit_Regexp, #visit_Struct, #visit_Time

Methods inherited from Visitors::Visitor

#accept, #initialize

Constructor Details

This class inherits a constructor from Psych::Stream

Instance Method Details

#visit_String(o) ⇒ Object Also known as: visit_Symbol



26
27
28
# File 'lib/psych/json/stream.rb', line 26

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