Method: Dnif::MultiAttribute.encode
- Defined in:
- lib/dnif/multi_attribute.rb
.encode(str) ⇒ Object
Returns an numeric representation of a Ruby String suitable for “multi” attributes of Sphinx.
Parameters:
- str
-
String to translate
33 34 35 36 |
# File 'lib/dnif/multi_attribute.rb', line 33 def self.encode(str) offset = 0 return str.bytes.collect { |c| (offset+= 0x0100) + c }.join(',') end |