Sha256: a36abe1ea73d848a2d54d8ea8146f09982fda4e40ca425bc2ef8c0e6cc45a07e

Contents?: true

Size: 784 Bytes

Versions: 4

Compression:

Stored size: 784 Bytes

Contents

=begin
Copyright 2011 Inside Systems, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=end

module CassandraCQL
  module Types
    class UTF8Type < AbstractType
      def self.cast(value)
        RUBY_VERSION >= "1.9" ? value.to_s.dup.force_encoding('UTF-8') : value.to_s.dup
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
hallelujah-cassandra-cql-1.0.4 lib/cassandra-cql/types/utf8_type.rb
cassandra-cql-1.0.4 lib/cassandra-cql/types/utf8_type.rb
cassandra-cql-1.0.2 lib/cassandra-cql/types/utf8_type.rb
cassandra-cql-1.0.1 lib/cassandra-cql/types/utf8_type.rb