Method: Psych::Visitors::YAMLTree#visit_NameError
- Defined in:
- lib/psych/visitors/yaml_tree.rb
#visit_NameError(o) ⇒ Object
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/psych/visitors/yaml_tree.rb', line 227 def visit_NameError o tag = ['!ruby/exception', o.class.name].join ':' @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK { 'message' => o..to_s, 'backtrace' => private_iv_get(o, 'backtrace'), }.each do |k,v| next unless v @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY accept v end dump_ivars o @emitter.end_mapping end |