End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Psych::Visitors::YAMLTree#visit_Struct
visit_Struct(o)
ext/psych/lib/psych/visitors/yaml_tree.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/ext/psych/lib/psych/visitors/yaml_tree.rb, line 169
def visit_Struct o
tag = ['!ruby/struct', o.class.name].compact.join(':')
register o, @emitter.start_mapping(nil, tag, false, Nodes::Mapping::BLOCK)
o.members.each do |member|
@emitter.scalar member.to_s, nil, nil, true, false, Nodes::Scalar::ANY
accept o[member]
end
dump_ivars o
@emitter.end_mapping
end
No documentation available
See also
#visit_String
#visit_Symbol
#visit_Regexp
#visit_Time
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0