Sha256: 7b556a8a3e795ad8620ddd837c28d474fcdd23f3dd50b20ced8169e4ea3825dd
Contents?: true
Size: 257 Bytes
Versions: 13
Compression:
Stored size: 257 Bytes
Contents
module OpenStructToHash def to_hash # from: http://snippets.dzone.com/posts/show/7312 h = @table # handles nested structures h.each do |k,v| if v.class == OpenStruct h[k] = v._to_hash end end return h end end
Version data entries
13 entries across 13 versions & 1 rubygems