lib/reap/iobject.rb in reap-9.3.5 vs lib/reap/iobject.rb in reap-9.4.0

- old
+ new

@@ -20,16 +20,18 @@ # # You should have received a copy of the GNU General Public License # along with Ratch. If not, see <http://www.gnu.org/licenses/>. require 'yaml' -require 'facets/hash/rekey' +require 'facets' #/hash/rekey - module Reap + # = InfoObject # + # This a base class used by Metadata. It provides a more versitle + # means of defining a data-oriented class. class InfoObject class << self @@ -105,10 +107,10 @@ def update(data) instance_data.update(data.rekey(:to_s)) data.each do |k,v| - send("#{k}=", v) rescue nil + send("#{k}=", v) if respond_to?("#{k}=") end # TODO Could add yield(self) via: #yld.to_h.each do |k,v| # send( "#{k}=", v ) rescue nil