# File lib/hash_attrs.rb, line 16 def hash_writer(hash_sym, syms) syms.each do |id| id = id.to_s.downcase func = Proc.new do |val| hash = instance_variable_get(hash_sym) hash[id.to_sym] = val end self.send(:define_method, id+'=', func) end end