Sha256: 39d2f652692aa1fd7ec298a65f200e368ae6e6f7e82764b1caeefedcc240f22c
Contents?: true
Size: 857 Bytes
Versions: 38
Compression:
Stored size: 857 Bytes
Contents
# encoding: utf-8 require "set" module Mongoid class Criteria module Queryable module Extensions # This module contains additional object behaviour. 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. # # @since 1.0.0 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
38 entries across 36 versions & 2 rubygems