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 def []=(key, val) @table[key.to_sym] = val end def [](key) @table[key.to_sym] end def each(&block) @table.each(&block) end end # * George Moschovitis