Sha256: a9194359d69c94ba63daf3f1cc78327f282cf530a148f26b9f9599571381ea60
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
module CouchPotato module GhostAttributes def self.included(base) base.class_eval do attr_accessor :_document def self.json_create(json) instance = super instance._document = json if json instance end def method_missing(name, *args) if(value = _document[name.to_s]) value else super end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
langalex-couch_potato-0.2.9 | lib/couch_potato/persistence/ghost_attributes.rb |