Class: ActiveSupport::Cache::Coder::StringDeserializer

Inherits:
Object
  • Object
show all
Defined in:
lib/active_support/cache/coder.rb

Instance Method Summary collapse

Constructor Details

#initialize(encoding) ⇒ StringDeserializer

Returns a new instance of StringDeserializer.



87
88
89
# File 'lib/active_support/cache/coder.rb', line 87

def initialize(encoding)
  @encoding = encoding
end

Instance Method Details

#load(payload) ⇒ Object



91
92
93
# File 'lib/active_support/cache/coder.rb', line 91

def load(payload)
  payload.force_encoding(@encoding)
end