Module: Mongoid::Extensions::String::Conversions

Extended by:
ActiveSupport::Concern
Included in:
String
Defined in:
lib/mongoid/extensions/string/conversions.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#to_aObject

Convert the string to an array with the string in it.

Example:

"Testing".to_a

Returns:

An array with only the string in it.



17
18
19
# File 'lib/mongoid/extensions/string/conversions.rb', line 17

def to_a
  [ self ]
end