Class: Moneta::Transforms::City32
- Inherits:
-
Moneta::Transform
- Object
- Moneta::Transform
- Moneta::Transforms::City32
- Defined in:
- lib/moneta/transforms/city32.rb
Overview
Hashes strings using the cityhash gem - 32 bit version
Instance Method Summary collapse
-
#encode(value) ⇒ String
Hashes using the
CityHash32
algorithm.
Methods inherited from Moneta::Transform
#decodable?, #decode, delegate_to, #initialize, #method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from Moneta::Transform
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Moneta::Transform
Instance Method Details
#encode(value) ⇒ String
Hashes using the CityHash32
algorithm
11 12 13 |
# File 'lib/moneta/transforms/city32.rb', line 11 def encode(value) ::CityHash.hash32(value).to_s(16) end |