Class: CassandraModel::StringType
- Defined in:
- lib/cassandra-model/types.rb
Class Method Summary collapse
Class Method Details
.dump(v) ⇒ Object
4 5 6 |
# File 'lib/cassandra-model/types.rb', line 4 def self.dump(v) v && v end |
.load(v) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/cassandra-model/types.rb', line 8 def self.load(v) #v && v.to_s return '' unless v s = v.to_s s.clone.force_encoding('UTF-8') if (RUBY_VERSION > '1.9' && s.encoding.name.downcase != 'utf-8') s end |