From: Richard Kilmer Date: 2003-09-24T04:13:53+09:00 Subject: Re: Creating classes with from YAML? C1 = YAML.load("--- !ruby/object:Class {}") The easiest way to figure out how to represent something in Ruby in YAML is just to call #to_yaml on your object: require 'yaml' C1 = Class.new puts C1.to_yaml #=> --- !ruby/object:Class {} -rich On Tuesday, September 23, 2003, at 03:01 PM, David Garamond wrote: > Remembering that all classes are instances of the Class class, is this > possible? I want to create some class named, say C1, which is empty > (or perhaps with one or two class instance vars) by loading a YAML > document. I can't seem to create instances of Class class in YAML, > while I can easily do this in irb: > > $ irb > irb(main):001:0> C1=Class.new > => C1 > irb(main):002:0> C1.new > => # > > -- > dave > > > >