Class: Psych::Visitors::JSONTree
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Psych::Visitors::YAMLTree
|
Defined in: | ext/psych/lib/psych/visitors/json_tree.rb |
Constant Summary
Class Method Summary
Instance Attribute Summary
YAMLTree - Inherited
#finished? | Alias for YAMLTree#finished. |
#started? | Alias for YAMLTree#started. |
Instance Method Summary
YAMLTree - Inherited
#<< | Alias for YAMLTree#push. |
#accept, #finish, #finished, #initialize, #push, #start, #started, #tree, #visit_Array, #visit_BasicObject, #visit_BigDecimal, #visit_Class, #visit_Complex, | |
#visit_Date | Alias for YAMLTree#visit_Integer. |
#visit_DateTime, #visit_Encoding, #visit_Exception, | |
#visit_FalseClass | Alias for YAMLTree#visit_Integer. |
#visit_Float, #visit_Hash, #visit_Integer, #visit_Module, #visit_NameError, #visit_NilClass, #visit_Object, #visit_Psych_Omap, #visit_Psych_Set, #visit_Range, #visit_Rational, #visit_Regexp, #visit_String, #visit_Struct, #visit_Symbol, #visit_Time, | |
#visit_TrueClass | Alias for YAMLTree#visit_Integer. |
#binary?, #dump_coder, #dump_ivars, #dump_list, #emit_coder, | |
#find_ivars | FIXME: remove this method once “to_yaml_properties” is removed. |
#format_time | See additional method definition at line 475. |
#private_iv_get | Get the private instance variable |
#register, #visit_array_subclass |
Visitor - Inherited
Constructor Details
This class inherits a constructor from Psych::Visitors::YAMLTree
Class Method Details
.create(options = {})
[ GitHub ]# File 'ext/psych/lib/psych/visitors/json_tree.rb', line 8
def self.create = {} emitter = Psych::JSON::TreeBuilder.new class_loader = ClassLoader.new ss = ScalarScanner.new class_loader new(emitter, ss, ) end
Instance Method Details
#accept(target)
[ GitHub ]# File 'ext/psych/lib/psych/visitors/json_tree.rb', line 15
def accept target if target.respond_to?(:encode_with) dump_coder target else send(@dispatch_cache[target.class], target) end end