Sha256: 1224bfdc46a482946714a59ed37a20bc717a11eecf369d0e6453f6cc2832c3f4
Contents?: true
Size: 439 Bytes
Versions: 3
Compression:
Stored size: 439 Bytes
Contents
# frozen_string_literal: true module Mongoload class AutoIncludeContext attr_reader :docs def initialize @docs = [] end def register_docs(docs) Array.wrap(docs).each do |model| model.auto_include_context = self self.docs << model end self end def self.register_docs(docs) auto_include_context = new auto_include_context.register_docs(docs) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoload-0.0.3 | lib/mongoload/auto_include_context.rb |
mongoload-0.0.2 | lib/mongoload/auto_include_context.rb |
mongoload-0.0.1 | lib/mongoload/auto_include_context.rb |