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

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#to_aArray

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

Examples:

Convert the string to an array.

"Testing".to_a

Returns:

  • (Array)

    An array with only the string in it.

Since:

  • 1.0.0



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

def to_a
  [ self ]
end