module Origin::Extensions::String::ClassMethods

Public Instance Methods

evolve(object) click to toggle source

Evolves the string into a MongoDB friendly value - in this case a string.

@example Evolve the string

String.evolve(1)

@param [ Object ] object The object to convert.

@return [ String ] The value as a string.

@since 1.0.0

# File lib/origin/extensions/string.rb, line 89
def evolve(object)
  __evolve__(object) do |obj|
    obj.regexp? ? obj : obj.to_s
  end
end