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.4.3 lib/mongomodel/support/types/string.rb
mongomodel-0.4.2 lib/mongomodel/support/types/string.rb
mongomodel-0.4.1 lib/mongomodel/support/types/string.rb
mongomodel-0.4.0 lib/mongomodel/support/types/string.rb
mongomodel-0.3.6 lib/mongomodel/support/types/string.rb
mongomodel-0.3.5 lib/mongomodel/support/types/string.rb
mongomodel-0.3.4 lib/mongomodel/support/types/string.rb
mongomodel-0.3.3 lib/mongomodel/support/types/string.rb
mongomodel-0.3.2 lib/mongomodel/support/types/string.rb
mongomodel-0.3.1 lib/mongomodel/support/types/string.rb
mongomodel-0.3.0 lib/mongomodel/support/types/string.rb
mongomodel-0.2.20 lib/mongomodel/support/types/string.rb
mongomodel-0.2.19 lib/mongomodel/support/types/string.rb
mongomodel-0.2.18 lib/mongomodel/support/types/string.rb
mongomodel-0.2.17 lib/mongomodel/support/types/string.rb
mongomodel-0.2.16 lib/mongomodel/support/types/string.rb
mongomodel-0.2.15 lib/mongomodel/support/types/string.rb
mongomodel-0.2.14 lib/mongomodel/support/types/string.rb
mongomodel-0.2.13 lib/mongomodel/support/types/string.rb
mongomodel-0.2.12 lib/mongomodel/support/types/string.rb