Sha256: 377a2f17ece32ba5f2a961fefae403870beaf959aa0e797fc33d3a8af119e94d

Contents?: true

Size: 165 Bytes

Versions: 26

Compression:

Stored size: 165 Bytes

Contents

module MongoModel
  module Types
    class String < Object
      def cast(value)
        value.to_s if value && value.respond_to?(:to_s)
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
mongomodel-0.2.11 lib/mongomodel/support/types/string.rb
mongomodel-0.2.10 lib/mongomodel/support/types/string.rb
mongomodel-0.2.9 lib/mongomodel/support/types/string.rb
mongomodel-0.2.8 lib/mongomodel/support/types/string.rb
mongomodel-0.2.7 lib/mongomodel/support/types/string.rb
mongomodel-0.2.6 lib/mongomodel/support/types/string.rb