Class: Galakei::Filter::Recode::Response

Inherits:
Base
  • Object
show all
Defined in:
lib/galakei/filter/recode.rb

Instance Attribute Summary

Attributes inherited from Base

#controller

Instance Method Summary collapse

Methods inherited from Base

condition?, filter, #html_content_type?, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Galakei::Filter::Base

Instance Method Details

#filterObject



38
39
40
41
42
43
# File 'lib/galakei/filter/recode.rb', line 38

def filter
  doc = Nokogiri::HTML(response.body)
  response.body = doc.serialize(:encoding => 'Shift_JIS')
  response.body = Galakei::EmojiTable.au_utf8_to_sjis(response.body)
  response.charset = "Shift_JIS"
end