Sha256: ef9811bb69c2fa13f0e87675be2cc089b7707b69845d4156021587d6da3f6c82
Contents?: true
Size: 460 Bytes
Versions: 9
Compression:
Stored size: 460 Bytes
Contents
# frozen_string_literal: true module ActiveRecordDataLoader module Dsl class Definition attr_reader :models def initialize(config = ActiveRecordDataLoader.configuration) @models = [] @config = config end def model(klass, &block) t = Model.new(klass: klass, configuration: config) block&.call(t) models << t t end private attr_reader :config end end end
Version data entries
9 entries across 9 versions & 1 rubygems