Sha256: 2bb91c8159c544bd58502e22134b356d1f58d05810fbc1aeb1b3add9eb1577a8
Contents?: true
Size: 735 Bytes
Versions: 9
Compression:
Stored size: 735 Bytes
Contents
# encoding: utf-8 module Mongoid #:nodoc module Associations #:nodoc class Proxy #:nodoc instance_methods.each do |method| undef_method(method) unless method =~ /(^__|^nil\?$|^send$|^object_id$|^extend$)/ end attr_reader \ :options, :target # Default behavior of method missing should be to delegate all calls # to the target of the proxy. This can be overridden in special cases. def method_missing(name, *args, &block) @target.send(name, *args, &block) end # If anonymous extensions are added this will take care of them. def extends(options) extend Module.new(&options.extension) if options.extension? end end end end
Version data entries
9 entries across 9 versions & 4 rubygems