Class | Jpmobile::Filter::Base |
In: |
lib/jpmobile/filter.rb
|
Parent: | Object |
文字コードフィルタのベースクラス。
内部コードから外部コードに変換
# File lib/jpmobile/filter.rb, line 37 37: def after(controller) 38: if respond_to?(:to_external) && apply_outgoing?(controller) && controller.response.body.is_a?(String) 39: controller.response.body = to_external(controller.response.body, controller) 40: after_after(controller) if respond_to? :after_after 41: end 42: end
入力時(params)にこのフィルタを適用するか
# File lib/jpmobile/filter.rb, line 44 44: def apply_incoming?(controller); true; end
出力時(response.body)にこのフィルタを適用するべきか
# File lib/jpmobile/filter.rb, line 46 46: def apply_outgoing?(controller); true; end