Sha256: 9b1264728e23cae2548596a88bb3f369a99c90677a456da3e36be642ea432e17

Contents?: true

Size: 549 Bytes

Versions: 22

Compression:

Stored size: 549 Bytes

Contents

# params を UTF-8 にする拡張
module Jpmobile
  module Encoding
    def parameters
      return @parameters if @jpmobile_params_converted

      # load params
      @parameters = super
      # 変換
      @parameters = Jpmobile::Util.deep_convert(@parameters) do |value|
        value = Jpmobile::Util.utf8(value)
        value
      end

      @jpmobile_params_converted = true
      if @parameters.respond_to?(:with_indifferent_access)
        @parameters = @parameters.with_indifferent_access
      end

      @parameters
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
jpmobile-8.0.0 lib/jpmobile/encoding.rb
jpmobile-7.2.0 lib/jpmobile/encoding.rb
jpmobile-7.1.0 lib/jpmobile/encoding.rb
jpmobile-7.0.4 lib/jpmobile/encoding.rb
jpmobile-7.0.3 lib/jpmobile/encoding.rb
jpmobile-7.0.2 lib/jpmobile/encoding.rb
jpmobile-7.0.1 lib/jpmobile/encoding.rb
jpmobile-7.0.0 lib/jpmobile/encoding.rb
jpmobile-6.1.2 lib/jpmobile/encoding.rb
jpmobile-6.1.1 lib/jpmobile/encoding.rb
jpmobile-6.1.0 lib/jpmobile/encoding.rb
jpmobile-6.0.0 lib/jpmobile/encoding.rb
jpmobile-5.2.5 lib/jpmobile/encoding.rb
jpmobile-6.0.0.beta lib/jpmobile/encoding.rb
jpmobile-5.2.4 lib/jpmobile/encoding.rb
jpmobile-5.0.1 lib/jpmobile/encoding.rb
jpmobile-5.1.1 lib/jpmobile/encoding.rb
jpmobile-5.2.3 lib/jpmobile/encoding.rb
jpmobile-5.2.2 lib/jpmobile/encoding.rb
jpmobile-5.2.1 lib/jpmobile/encoding.rb