method
object_maker
ruby latest stable - Class:
YAML
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.
object_maker( obj_class, val )public
Allocate blank object
# File lib/yaml.rb, line 365
def YAML.object_maker( obj_class, val )
if Hash === val
o = obj_class.allocate
val.each_pair { |k,v|
o.instance_variable_set("@#{k}", v)
}
o
else
raise YAML::Error, "Invalid object explicitly tagged !ruby/Object: " + val.inspect
end
end Related methods
- Class methods
- add_builtin_type
- add_domain_type
- add_private_type
- add_ruby_type
- detect_implicit
- dump
- dump_stream
- each_document
- each_node
- emitter
- escape
- generic_parser
- load
- load_documents
- load_file
- load_stream
- make_stream
- object_maker
- parse
- parse_documents
- parse_file
- parser
- quick_emit
- read_type_class
- resolver
- tag_class
- tagged_classes
- tagurize
- transfer
- try_implicit
- unescape