class Mongoload::AutoIncludeContext
Attributes
docs[R]
Public Class Methods
new()
click to toggle source
# File lib/mongoload/auto_include_context.rb, line 6 def initialize @docs = [] end
register_docs(docs)
click to toggle source
# File lib/mongoload/auto_include_context.rb, line 18 def self.register_docs(docs) auto_include_context = new auto_include_context.register_docs(docs) end
Public Instance Methods
register_docs(docs)
click to toggle source
# File lib/mongoload/auto_include_context.rb, line 10 def register_docs(docs) Array.wrap(docs).each do |model| model.auto_include_context = self self.docs << model end self end