lazier 3.5.7 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.travis-gemfile +5 -4
  3. data/.travis.yml +2 -2
  4. data/CHANGELOG.md +65 -8
  5. data/Gemfile +9 -8
  6. data/README.md +4 -0
  7. data/doc/Lazier.html +178 -110
  8. data/doc/Lazier/Boolean.html +7 -7
  9. data/doc/Lazier/Configuration.html +24 -50
  10. data/doc/Lazier/DateTime.html +50 -305
  11. data/doc/Lazier/DateTime/ClassMethods.html +116 -806
  12. data/doc/Lazier/Exceptions.html +2 -2
  13. data/doc/Lazier/Exceptions/Debug.html +1 -1
  14. data/doc/Lazier/Exceptions/MissingTranslation.html +18 -14
  15. data/doc/Lazier/Exceptions/TranslationExceptionHandler.html +213 -0
  16. data/doc/Lazier/Hash.html +19 -155
  17. data/doc/Lazier/I18n.html +1735 -230
  18. data/doc/Lazier/Math.html +1 -1
  19. data/doc/Lazier/Math/ClassMethods.html +13 -13
  20. data/doc/Lazier/Object.html +353 -339
  21. data/doc/Lazier/Pathname.html +4 -4
  22. data/doc/Lazier/Settings.html +150 -304
  23. data/doc/Lazier/String.html +39 -199
  24. data/doc/Lazier/TimeZone.html +244 -746
  25. data/doc/Lazier/TimeZone/ClassMethods.html +109 -127
  26. data/doc/Lazier/Version.html +4 -4
  27. data/doc/_index.html +15 -15
  28. data/doc/class_list.html +1 -1
  29. data/doc/file.README.html +5 -1
  30. data/doc/index.html +5 -1
  31. data/doc/method_list.html +97 -169
  32. data/doc/top-level-namespace.html +1 -1
  33. data/lazier.gemspec +9 -6
  34. data/lib/lazier.rb +41 -50
  35. data/lib/lazier/boolean.rb +0 -1
  36. data/lib/lazier/configuration.rb +26 -28
  37. data/lib/lazier/datetime.rb +33 -127
  38. data/lib/lazier/exceptions.rb +14 -6
  39. data/lib/lazier/hash.rb +7 -15
  40. data/lib/lazier/i18n.rb +130 -48
  41. data/lib/lazier/math.rb +6 -7
  42. data/lib/lazier/object.rb +79 -97
  43. data/lib/lazier/pathname.rb +0 -1
  44. data/lib/lazier/settings.rb +12 -25
  45. data/lib/lazier/string.rb +17 -38
  46. data/lib/lazier/timezone.rb +168 -164
  47. data/lib/lazier/version.rb +3 -4
  48. data/locales/en.yml +52 -51
  49. data/locales/it.yml +51 -50
  50. data/spec/coverage_helper.rb +0 -1
  51. data/spec/lazier/boolean_spec.rb +2 -3
  52. data/spec/lazier/configuration_spec.rb +3 -5
  53. data/spec/lazier/datetime_spec.rb +34 -95
  54. data/spec/lazier/exceptions_spec.rb +25 -0
  55. data/spec/lazier/hash_spec.rb +0 -21
  56. data/spec/lazier/i18n_spec.rb +135 -51
  57. data/spec/lazier/math_spec.rb +0 -1
  58. data/spec/lazier/object_spec.rb +105 -100
  59. data/spec/lazier/pathname_spec.rb +0 -1
  60. data/spec/lazier/settings_spec.rb +25 -28
  61. data/spec/lazier/string_spec.rb +7 -20
  62. data/spec/lazier/timezone_spec.rb +101 -87
  63. data/spec/lazier_spec.rb +25 -8
  64. data/spec/spec_helper.rb +3 -2
  65. metadata +15 -44
  66. data/doc/Lazier/Localizer.html +0 -545
  67. data/lib/lazier/localizer.rb +0 -41
  68. data/spec/lazier/localizer_spec.rb +0 -45
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  #
3
2
  # This file is part of the lazier gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>.
4
3
  # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
@@ -12,4 +11,6 @@ RSpec.configure do |config|
12
11
  config.expect_with :rspec do |c|
13
12
  c.syntax = :expect
14
13
  end
15
- end
14
+ end
15
+
16
+ Lazier::I18n.default_locale = :en
metadata CHANGED
@@ -1,85 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.7
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: json
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.8.1
19
+ version: '4.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.8.1
27
- - !ruby/object:Gem::Dependency
28
- name: activesupport
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 3.2.13
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 3.2.13
26
+ version: '4.1'
41
27
  - !ruby/object:Gem::Dependency
42
- name: tzinfo
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 0.3.37
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: 0.3.37
55
- - !ruby/object:Gem::Dependency
56
- name: r18n-desktop
28
+ name: hashie
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: 1.1.10
33
+ version: '2.1'
62
34
  type: :runtime
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
38
  - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: 1.1.10
40
+ version: '2.1'
69
41
  - !ruby/object:Gem::Dependency
70
- name: hashie
42
+ name: oj
71
43
  requirement: !ruby/object:Gem::Requirement
72
44
  requirements:
73
45
  - - "~>"
74
46
  - !ruby/object:Gem::Version
75
- version: 2.1.1
47
+ version: '2.9'
76
48
  type: :runtime
77
49
  prerelease: false
78
50
  version_requirements: !ruby/object:Gem::Requirement
79
51
  requirements:
80
52
  - - "~>"
81
53
  - !ruby/object:Gem::Version
82
- version: 2.1.1
54
+ version: '2.9'
83
55
  description: Several Ruby object enhancements.
84
56
  email:
85
57
  - shogun@cowtech.it
@@ -105,9 +77,9 @@ files:
105
77
  - doc/Lazier/Exceptions.html
106
78
  - doc/Lazier/Exceptions/Debug.html
107
79
  - doc/Lazier/Exceptions/MissingTranslation.html
80
+ - doc/Lazier/Exceptions/TranslationExceptionHandler.html
108
81
  - doc/Lazier/Hash.html
109
82
  - doc/Lazier/I18n.html
110
- - doc/Lazier/Localizer.html
111
83
  - doc/Lazier/Math.html
112
84
  - doc/Lazier/Math/ClassMethods.html
113
85
  - doc/Lazier/Object.html
@@ -139,7 +111,6 @@ files:
139
111
  - lib/lazier/exceptions.rb
140
112
  - lib/lazier/hash.rb
141
113
  - lib/lazier/i18n.rb
142
- - lib/lazier/localizer.rb
143
114
  - lib/lazier/math.rb
144
115
  - lib/lazier/object.rb
145
116
  - lib/lazier/pathname.rb
@@ -153,9 +124,9 @@ files:
153
124
  - spec/lazier/boolean_spec.rb
154
125
  - spec/lazier/configuration_spec.rb
155
126
  - spec/lazier/datetime_spec.rb
127
+ - spec/lazier/exceptions_spec.rb
156
128
  - spec/lazier/hash_spec.rb
157
129
  - spec/lazier/i18n_spec.rb
158
- - spec/lazier/localizer_spec.rb
159
130
  - spec/lazier/math_spec.rb
160
131
  - spec/lazier/object_spec.rb
161
132
  - spec/lazier/pathname_spec.rb
@@ -176,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
147
  requirements:
177
148
  - - ">="
178
149
  - !ruby/object:Gem::Version
179
- version: 1.9.3
150
+ version: '2.1'
180
151
  required_rubygems_version: !ruby/object:Gem::Requirement
181
152
  requirements:
182
153
  - - ">="
@@ -193,9 +164,9 @@ test_files:
193
164
  - spec/lazier/boolean_spec.rb
194
165
  - spec/lazier/configuration_spec.rb
195
166
  - spec/lazier/datetime_spec.rb
167
+ - spec/lazier/exceptions_spec.rb
196
168
  - spec/lazier/hash_spec.rb
197
169
  - spec/lazier/i18n_spec.rb
198
- - spec/lazier/localizer_spec.rb
199
170
  - spec/lazier/math_spec.rb
200
171
  - spec/lazier/object_spec.rb
201
172
  - spec/lazier/pathname_spec.rb
@@ -1,545 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: Lazier::Localizer
8
-
9
- &mdash; Documentation by YARD 0.8.7.4
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!Lazier/Localizer.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (L)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../Lazier.html" title="Lazier (module)">Lazier</a></span></span>
36
- &raquo;
37
- <span class="title">Localizer</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: Lazier::Localizer
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">Lazier::Localizer</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
- <dt class="r2">Includes:</dt>
94
- <dd class="r2"><span class='object_link'><a href="I18n.html" title="Lazier::I18n (module)">I18n</a></span></dd>
95
-
96
-
97
-
98
-
99
-
100
- <dt class="r1 last">Defined in:</dt>
101
- <dd class="r1 last">lib/lazier/localizer.rb</dd>
102
-
103
- </dl>
104
- <div class="clear"></div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
- <p>A utility class to localize messages</p>
109
-
110
-
111
- </div>
112
- </div>
113
- <div class="tags">
114
-
115
-
116
- </div>
117
-
118
-
119
-
120
-
121
-
122
- <h2>Instance Attribute Summary</h2>
123
-
124
- <h3 class="inherited">Attributes included from <span class='object_link'><a href="I18n.html" title="Lazier::I18n (module)">I18n</a></span></h3>
125
- <p class="inherited"><span class='object_link'><a href="I18n.html#i18n_locale-instance_method" title="Lazier::I18n#i18n_locale (method)">#i18n_locale</a></span>, <span class='object_link'><a href="I18n.html#i18n_locales_path-instance_method" title="Lazier::I18n#i18n_locales_path (method)">#i18n_locales_path</a></span>, <span class='object_link'><a href="I18n.html#i18n_root-instance_method" title="Lazier::I18n#i18n_root (method)">#i18n_root</a></span></p>
126
-
127
-
128
-
129
- <h2>
130
- Class Method Summary
131
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
132
- </h2>
133
-
134
- <ul class="summary">
135
-
136
- <li class="public ">
137
- <span class="summary_signature">
138
-
139
- <a href="#localize-class_method" title="localize (class method)">+ (String|R18n::Untranslated) <strong>localize</strong>(message, *args) </a>
140
-
141
-
142
-
143
- </span>
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
- <span class="summary_desc"><div class='inline'><p>Localize a message.</p>
154
- </div></span>
155
-
156
- </li>
157
-
158
-
159
- <li class="public ">
160
- <span class="summary_signature">
161
-
162
- <a href="#localize_on_locale-class_method" title="localize_on_locale (class method)">+ (String|R18n::Untranslated) <strong>localize_on_locale</strong>(locale, message, *args) </a>
163
-
164
-
165
-
166
- </span>
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
- <span class="summary_desc"><div class='inline'><p>Localize a message in a specified locale.</p>
177
- </div></span>
178
-
179
- </li>
180
-
181
-
182
- </ul>
183
-
184
- <h2>
185
- Instance Method Summary
186
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
187
- </h2>
188
-
189
- <ul class="summary">
190
-
191
- <li class="public ">
192
- <span class="summary_signature">
193
-
194
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Localizer) <strong>initialize</strong>(root = nil, path = nil, locale = nil) </a>
195
-
196
-
197
-
198
- </span>
199
-
200
-
201
- <span class="note title constructor">constructor</span>
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'><p>Initialize a new localizer.</p>
211
- </div></span>
212
-
213
- </li>
214
-
215
-
216
- </ul>
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
- <h3 class="inherited">Methods included from <span class='object_link'><a href="I18n.html" title="Lazier::I18n (module)">I18n</a></span></h3>
229
- <p class="inherited"><span class='object_link'><a href="I18n.html#i18n-instance_method" title="Lazier::I18n#i18n (method)">#i18n</a></span>, <span class='object_link'><a href="I18n.html#i18n%3D-instance_method" title="Lazier::I18n#i18n= (method)">#i18n=</a></span>, <span class='object_link'><a href="I18n.html#i18n_setup-instance_method" title="Lazier::I18n#i18n_setup (method)">#i18n_setup</a></span></p>
230
- <div id="constructor_details" class="method_details_list">
231
- <h2>Constructor Details</h2>
232
-
233
- <div class="method_details first">
234
- <h3 class="signature first" id="initialize-instance_method">
235
-
236
- - (<tt><span class='object_link'><a href="" title="Lazier::Localizer (class)">Localizer</a></span></tt>) <strong>initialize</strong>(root = nil, path = nil, locale = nil)
237
-
238
-
239
-
240
-
241
-
242
- </h3><div class="docstring">
243
- <div class="discussion">
244
- <p>Initialize a new localizer.</p>
245
-
246
-
247
- </div>
248
- </div>
249
- <div class="tags">
250
- <p class="tag_title">Parameters:</p>
251
- <ul class="param">
252
-
253
- <li>
254
-
255
- <span class='name'>root</span>
256
-
257
-
258
- <span class='type'>(<tt>Symbol</tt>)</span>
259
-
260
-
261
- <em class="default">(defaults to: <tt>nil</tt>)</em>
262
-
263
-
264
- &mdash;
265
- <div class='inline'><p>The root level of the translation.</p>
266
- </div>
267
-
268
- </li>
269
-
270
- <li>
271
-
272
- <span class='name'>path</span>
273
-
274
-
275
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
276
-
277
-
278
- <em class="default">(defaults to: <tt>nil</tt>)</em>
279
-
280
-
281
- &mdash;
282
- <div class='inline'><p>The path where the translations are stored.</p>
283
- </div>
284
-
285
- </li>
286
-
287
- <li>
288
-
289
- <span class='name'>locale</span>
290
-
291
-
292
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
293
-
294
-
295
- <em class="default">(defaults to: <tt>nil</tt>)</em>
296
-
297
-
298
- &mdash;
299
- <div class='inline'><p>The locale to use for localization.</p>
300
- </div>
301
-
302
- </li>
303
-
304
- </ul>
305
-
306
-
307
- </div><table class="source_code">
308
- <tr>
309
- <td>
310
- <pre class="lines">
311
-
312
-
313
- 17
314
- 18
315
- 19
316
- 20</pre>
317
- </td>
318
- <td>
319
- <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 17</span>
320
-
321
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
322
- <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='id identifier rubyid_root'>root</span> <span class='op'>||</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
323
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span> <span class='op'>=</span> <span class='id identifier rubyid_locale'>locale</span>
324
- <span class='kw'>end</span></pre>
325
- </td>
326
- </tr>
327
- </table>
328
- </div>
329
-
330
- </div>
331
-
332
-
333
- <div id="class_method_details" class="method_details_list">
334
- <h2>Class Method Details</h2>
335
-
336
-
337
- <div class="method_details first">
338
- <h3 class="signature first" id="localize-class_method">
339
-
340
- + (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|R18n::Untranslated</tt>) <strong>localize</strong>(message, *args)
341
-
342
-
343
-
344
-
345
-
346
- </h3><div class="docstring">
347
- <div class="discussion">
348
- <p>Localize a message.</p>
349
-
350
-
351
- </div>
352
- </div>
353
- <div class="tags">
354
- <p class="tag_title">Parameters:</p>
355
- <ul class="param">
356
-
357
- <li>
358
-
359
- <span class='name'>message</span>
360
-
361
-
362
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
363
-
364
-
365
-
366
- &mdash;
367
- <div class='inline'><p>The message to localize.</p>
368
- </div>
369
-
370
- </li>
371
-
372
- <li>
373
-
374
- <span class='name'>args</span>
375
-
376
-
377
- <span class='type'>(<tt>Array</tt>)</span>
378
-
379
-
380
-
381
- &mdash;
382
- <div class='inline'><p>Optional arguments to localize the message.</p>
383
- </div>
384
-
385
- </li>
386
-
387
- </ul>
388
-
389
- <p class="tag_title">Returns:</p>
390
- <ul class="return">
391
-
392
- <li>
393
-
394
-
395
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|R18n::Untranslated</tt>)</span>
396
-
397
-
398
-
399
- &mdash;
400
- <div class='inline'><p>The localized message.</p>
401
- </div>
402
-
403
- </li>
404
-
405
- </ul>
406
-
407
- </div><table class="source_code">
408
- <tr>
409
- <td>
410
- <pre class="lines">
411
-
412
-
413
- 27
414
- 28
415
- 29</pre>
416
- </td>
417
- <td>
418
- <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 27</span>
419
-
420
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
421
- <span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
422
- <span class='kw'>end</span></pre>
423
- </td>
424
- </tr>
425
- </table>
426
- </div>
427
-
428
- <div class="method_details ">
429
- <h3 class="signature " id="localize_on_locale-class_method">
430
-
431
- + (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|R18n::Untranslated</tt>) <strong>localize_on_locale</strong>(locale, message, *args)
432
-
433
-
434
-
435
-
436
-
437
- </h3><div class="docstring">
438
- <div class="discussion">
439
- <p>Localize a message in a specified locale.</p>
440
-
441
-
442
- </div>
443
- </div>
444
- <div class="tags">
445
- <p class="tag_title">Parameters:</p>
446
- <ul class="param">
447
-
448
- <li>
449
-
450
- <span class='name'>locale</span>
451
-
452
-
453
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
454
-
455
-
456
-
457
- &mdash;
458
- <div class='inline'><p>The locale to use for localization.</p>
459
- </div>
460
-
461
- </li>
462
-
463
- <li>
464
-
465
- <span class='name'>message</span>
466
-
467
-
468
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
469
-
470
-
471
-
472
- &mdash;
473
- <div class='inline'><p>The message to localize.</p>
474
- </div>
475
-
476
- </li>
477
-
478
- <li>
479
-
480
- <span class='name'>args</span>
481
-
482
-
483
- <span class='type'>(<tt>Array</tt>)</span>
484
-
485
-
486
-
487
- &mdash;
488
- <div class='inline'><p>Optional arguments to localize the message.</p>
489
- </div>
490
-
491
- </li>
492
-
493
- </ul>
494
-
495
- <p class="tag_title">Returns:</p>
496
- <ul class="return">
497
-
498
- <li>
499
-
500
-
501
- <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|R18n::Untranslated</tt>)</span>
502
-
503
-
504
-
505
- &mdash;
506
- <div class='inline'><p>The localized message.</p>
507
- </div>
508
-
509
- </li>
510
-
511
- </ul>
512
-
513
- </div><table class="source_code">
514
- <tr>
515
- <td>
516
- <pre class="lines">
517
-
518
-
519
- 37
520
- 38
521
- 39</pre>
522
- </td>
523
- <td>
524
- <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 37</span>
525
-
526
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize_on_locale'>localize_on_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
527
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
528
- <span class='kw'>end</span></pre>
529
- </td>
530
- </tr>
531
- </table>
532
- </div>
533
-
534
- </div>
535
-
536
- </div>
537
-
538
- <div id="footer">
539
- Generated on Thu Jun 19 11:49:05 2014 by
540
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
541
- 0.8.7.4 (ruby-2.1.2).
542
- </div>
543
-
544
- </body>
545
- </html>