lib/glue/flexob.rb in glue-0.15.0 vs lib/glue/flexob.rb in glue-0.16.0

- old
+ new

@@ -1,12 +1,19 @@ # * George Moschovitis <gm@navel.gr> # (c) 2004-2005 Navel, all rights reserved. -# $Id$ +# $Id: flexob.rb 1 2005-04-11 11:04:30Z gmosx $ require 'ostruct' # A flexible Object. # Temporarily implemented as a simple OpenStruct. class Flexob < OpenStruct + def update(hash) + hash.each do |k, v| + send("#{k}=", v) + end + end + alias_method :set, :update + end