Class Index [+]

Quicksearch

I18n::Tests::Interpolation

Protected Instance Methods

capture(stream) click to toggle source
     # File lib/i18n/tests/interpolation.rb, line 109
109:       def capture(stream)
110:         begin
111:           stream = stream.to_s
112:           eval "$#{stream} = StringIO.new"
113:           yield
114:           result = eval("$#{stream}").string
115:         ensure
116:           eval("$#{stream} = #{stream.upcase}")
117:         end
118: 
119:         result
120:       end
euc_jp(string) click to toggle source
     # File lib/i18n/tests/interpolation.rb, line 122
122:       def euc_jp(string)
123:         string.encode!(Encoding::EUC_JP)
124:       end
interpolate(*args) click to toggle source
     # File lib/i18n/tests/interpolation.rb, line 126
126:       def interpolate(*args)
127:         options = args.last.is_a?(Hash) ? args.pop : {}
128:         key = args.pop
129:         I18n.backend.translate('en', key, options)
130:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.