Sha256: 7fc8bdb3a8701eea4d581a62d1e8770a26029e8b65aa596e2139c00778b1826c
Contents?: true
Size: 329 Bytes
Versions: 4
Compression:
Stored size: 329 Bytes
Contents
require 'ostruct' class OpenStruct # Insert/update hash data on the fly. # # require 'facet/ostruct/ostruct_update' # # o = OpenStruct.new # o.ostruct_update { :a => 2 } # o.a #=> 2 # def ostruct_update( hash ) if hash for k,v in hash @table[k.to_sym] = v end end end end
Version data entries
4 entries across 4 versions & 1 rubygems