Sha256: d8bfd0f3256c31c76d07350f380f1c6f3730621c498bb73697a057f233d0a617

Contents?: true

Size: 293 Bytes

Versions: 3

Compression:

Stored size: 293 Bytes

Contents

module CouchPotato
  module GhostAttributes # :nodoc:
    def method_missing(name, *)
      if (value = _document && _document[name.to_s])
        value
      else
        super
      end
    end

    def respond_to_missing?(name, *)
      _document && _document[name.to_s]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
couch_potato-1.18.0 lib/couch_potato/persistence/ghost_attributes.rb
couch_potato-1.17.0 lib/couch_potato/persistence/ghost_attributes.rb
couch_potato-1.16.0 lib/couch_potato/persistence/ghost_attributes.rb