Sha256: 6cf47a152d056aaf216edfc9e7411c89c53e8b0c588b0324890dbc49f10cdc30
Contents?: true
Size: 829 Bytes
Versions: 18
Compression:
Stored size: 829 Bytes
Contents
# frozen_string_literal: true require "set" module Mongoid class Criteria module Queryable module Extensions # This module contains additional object behavior. module Set module ClassMethods # Evolve the set, casting all its elements. # # @example Evolve the set. # Set.evolve(set) # # @param [ Set | Object ] object The object to evolve. # # @return [ Array ] The evolved set. def evolve(object) return object if !object || !object.respond_to?(:map) object.map{ |obj| obj.class.evolve(obj) } end end end end end end end ::Set.__send__(:extend, Mongoid::Criteria::Queryable::Extensions::Set::ClassMethods)
Version data entries
18 entries across 18 versions & 1 rubygems