lib/grumlin/repository.rb in grumlin-0.20.2 vs lib/grumlin/repository.rb in grumlin-0.21.0

- old
+ new

@@ -8,14 +8,21 @@ single: :next, traversal: :nil }.freeze def self.extended(base) + super base.extend(Grumlin::Shortcuts) base.include(Repository::InstanceMethods) base.shortcuts_from(Grumlin::Shortcuts::Properties) base.shortcuts_from(Grumlin::Shortcuts::Upserts) + end + + def self.new + @repository ||= Class.new do # rubocop:disable Naming/MemoizedInstanceVariableName + extend Grumlin::Repository + end.new end def query(name, return_mode: :list, postprocess_with: nil, &query_block) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity return_mode = validate_return_mode!(return_mode) postprocess_with = validate_postprocess_with!(postprocess_with)