Module: Origin::Extensions::Set::ClassMethods

Defined in:
lib/origin/extensions/set.rb

Instance Method Summary collapse

Instance Method Details

#evolve(object) ⇒ Array

Evolve the set, casting all its elements.

Examples:

Evolve the set.

Set.evolve(set)

Since:

  • 1.0.0



21
22
23
24
# File 'lib/origin/extensions/set.rb', line 21

def evolve(object)
  return object if !object || !object.respond_to?(:map)
  object.map{ |obj| obj.class.evolve(obj) }
end