Method: Psych.object_maker
- Defined in:
- lib/psych/deprecated.rb
.object_maker(klass, hash) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/psych/deprecated.rb', line 72 def self.object_maker klass, hash warn "#{caller[0]}: object_maker is deprecated" if $VERBOSE klass.allocate.tap do |obj| hash.each { |k,v| obj.instance_variable_set(:"@#{k}", v) } end end |