Sha256: 143b84fb54f3087bdb821189c7be06a0e6f46cbdbb9c6afbf5a1a8ad3aece74a
Contents?: true
Size: 282 Bytes
Versions: 17
Compression:
Stored size: 282 Bytes
Contents
require 'ostruct' class OpenStruct def self.to_mongo(value) if value.kind_of?(self) value.send(:table) else value end end def self.from_mongo(value) if value.kind_of?(self) value else OpenStruct.new(value || {}) end end end
Version data entries
17 entries across 17 versions & 1 rubygems