lazier 2.8.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. data/Gemfile +3 -3
  2. data/doc/Lazier.html +69 -99
  3. data/doc/Lazier/Boolean.html +6 -6
  4. data/doc/Lazier/DateTime.html +35 -39
  5. data/doc/Lazier/DateTime/ClassMethods.html +59 -85
  6. data/doc/Lazier/Exceptions.html +6 -6
  7. data/doc/Lazier/Exceptions/Debug.html +133 -0
  8. data/doc/Lazier/Exceptions/MissingTranslation.html +8 -8
  9. data/doc/Lazier/Hash.html +5 -270
  10. data/doc/Lazier/I18n.html +68 -26
  11. data/doc/Lazier/Localizer.html +17 -21
  12. data/doc/Lazier/Math.html +5 -5
  13. data/doc/Lazier/Math/ClassMethods.html +5 -5
  14. data/doc/Lazier/Object.html +681 -218
  15. data/doc/Lazier/Pathname.html +7 -11
  16. data/doc/Lazier/Settings.html +166 -262
  17. data/doc/Lazier/String.html +21 -25
  18. data/doc/Lazier/TimeZone.html +119 -130
  19. data/doc/Lazier/TimeZone/ClassMethods.html +75 -83
  20. data/doc/Lazier/Version.html +8 -8
  21. data/doc/_index.html +7 -7
  22. data/doc/class_list.html +2 -2
  23. data/doc/file.README.html +5 -5
  24. data/doc/file_list.html +1 -1
  25. data/doc/frames.html +1 -1
  26. data/doc/index.html +5 -5
  27. data/doc/js/full_list.js +6 -1
  28. data/doc/method_list.html +134 -324
  29. data/doc/top-level-namespace.html +5 -5
  30. data/lazier.gemspec +4 -3
  31. data/lib/lazier.rb +9 -23
  32. data/lib/lazier/boolean.rb +1 -1
  33. data/lib/lazier/datetime.rb +47 -79
  34. data/lib/lazier/exceptions.rb +4 -4
  35. data/lib/lazier/hash.rb +0 -24
  36. data/lib/lazier/i18n.rb +13 -6
  37. data/lib/lazier/localizer.rb +3 -5
  38. data/lib/lazier/object.rb +107 -78
  39. data/lib/lazier/pathname.rb +1 -3
  40. data/lib/lazier/settings.rb +22 -30
  41. data/lib/lazier/string.rb +3 -5
  42. data/lib/lazier/version.rb +3 -3
  43. data/spec/lazier/datetime_spec.rb +8 -8
  44. data/spec/lazier/hash_spec.rb +9 -10
  45. data/spec/lazier/object_spec.rb +85 -11
  46. data/spec/lazier/settings_spec.rb +10 -17
  47. data/spec/lazier_spec.rb +1 -1
  48. metadata +26 -9
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Module: Lazier::Pathname
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -195,17 +195,13 @@ Pathname.new("/usr/bin/ruby").components
195
195
 
196
196
  20
197
197
  21
198
- 22
199
- 23
200
- 24</pre>
198
+ 22</pre>
201
199
  </td>
202
200
  <td>
203
201
  <pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 20</span>
204
202
 
205
203
  <span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
206
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
207
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_filename'>each_filename</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_p'>p</span> <span class='rbrace'>}</span>
208
- <span class='id identifier rubyid_rv'>rv</span>
204
+ <span class='id identifier rubyid_each_filename'>each_filename</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
209
205
  <span class='kw'>end</span></pre>
210
206
  </td>
211
207
  </tr>
@@ -217,9 +213,9 @@ Pathname.new("/usr/bin/ruby").components
217
213
  </div>
218
214
 
219
215
  <div id="footer">
220
- Generated on Sat Apr 13 11:56:54 2013 by
216
+ Generated on Fri May 17 12:03:22 2013 by
221
217
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
222
- 0.8.5.2 (ruby-1.9.3).
218
+ 0.8.6.1 (ruby-1.9.3).
223
219
  </div>
224
220
 
225
221
  </body>
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Class: Lazier::Settings
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -428,7 +428,7 @@
428
428
  <li class="public ">
429
429
  <span class="summary_signature">
430
430
 
431
- <a href="#setup_format_number-instance_method" title="#setup_format_number (instance method)">- (Hash) <strong>setup_format_number</strong>(prec = 2, decimal_separator = &quot;.&quot;, add_string = &quot;&quot;, k_separator = &quot;,&quot;) </a>
431
+ <a href="#setup_format_number-instance_method" title="#setup_format_number (instance method)">- (Hash) <strong>setup_format_number</strong>(precision = 2, decimal_separator = &quot;.&quot;, add_string = nil, k_separator = &quot;,&quot;) </a>
432
432
 
433
433
 
434
434
 
@@ -499,8 +499,8 @@
499
499
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 38</span>
500
500
 
501
501
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
502
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
503
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
502
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
503
+ <span class='id identifier rubyid_setup'>setup</span>
504
504
  <span class='kw'>end</span></pre>
505
505
  </td>
506
506
  </tr>
@@ -653,15 +653,7 @@
653
653
  114
654
654
  115
655
655
  116
656
- 117
657
- 118
658
- 119
659
- 120
660
- 121
661
- 122
662
- 123
663
- 124
664
- 125</pre>
656
+ 117</pre>
665
657
  </td>
666
658
  <td>
667
659
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
@@ -680,21 +672,21 @@
680
672
  </span> <span class='comment'># @return [Settings] The singleton instance of the settings.
681
673
  </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
682
674
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
683
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
675
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
684
676
  <span class='kw'>end</span>
685
677
 
686
678
  <span class='comment'># Initializes a new settings object.
687
679
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
688
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
689
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
680
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
681
+ <span class='id identifier rubyid_setup'>setup</span>
690
682
  <span class='kw'>end</span>
691
683
 
692
684
  <span class='comment'># Setups the current instance.
693
685
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
694
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
695
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
696
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
697
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
686
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
687
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
688
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
689
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
698
690
  <span class='kw'>end</span>
699
691
 
700
692
  <span class='comment'># Set the current locale for messages.
@@ -703,19 +695,19 @@
703
695
  </span> <span class='comment'># @return [R18n::Translation] The new translation object.
704
696
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_i18n='>i18n=</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
705
697
  <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
706
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
698
+ <span class='id identifier rubyid_setup'>setup</span>
707
699
  <span class='kw'>end</span>
708
700
 
709
701
  <span class='comment'># Setups formatters for a number.
710
702
  </span> <span class='comment'># @see Object#format_number
711
703
  </span> <span class='comment'>#
712
- </span> <span class='comment'># @param prec [Fixnum] The precision to show.
704
+ </span> <span class='comment'># @param precision [Fixnum] The precision to show.
713
705
  </span> <span class='comment'># @param decimal_separator [String] The string to use as decimal separator.
714
706
  </span> <span class='comment'># @param add_string [String] The string to append to the number.
715
707
  </span> <span class='comment'># @param k_separator [String] The string to use as thousands separator.
716
708
  </span> <span class='comment'># @return [Hash] The new formatters.
717
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
718
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
709
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
710
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
719
711
  <span class='kw'>end</span>
720
712
 
721
713
  <span class='comment'># Setups strings representation of booleans.
@@ -725,9 +717,7 @@
725
717
  </span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
726
718
  </span> <span class='comment'># @return [Hash] The new representations.
727
719
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
728
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
729
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
730
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
720
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
731
721
  <span class='kw'>end</span>
732
722
 
733
723
  <span class='comment'># Setups custom formats for dates and times.
@@ -737,18 +727,10 @@
737
727
  </span> <span class='comment'># @param replace [Boolean] If to discard current formats.
738
728
  </span> <span class='comment'># @return [Hash] The new formats.
739
729
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
740
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
730
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
741
731
 
742
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
743
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
744
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
745
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
746
- <span class='kw'>else</span>
747
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
748
- <span class='kw'>end</span>
749
-
750
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
751
- <span class='kw'>end</span>
732
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
733
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
752
734
 
753
735
  <span class='ivar'>@date_formats</span>
754
736
  <span class='kw'>end</span>
@@ -764,12 +746,14 @@
764
746
  </span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
765
747
  </span> <span class='comment'># @return [Hash] The new representations.
766
748
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
767
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
768
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
769
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
770
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
771
-
772
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
749
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
750
+
751
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
752
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
753
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
754
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
755
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
756
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
773
757
  <span class='kw'>end</span>
774
758
  <span class='kw'>end</span></pre>
775
759
  </td>
@@ -918,15 +902,7 @@
918
902
  114
919
903
  115
920
904
  116
921
- 117
922
- 118
923
- 119
924
- 120
925
- 121
926
- 122
927
- 123
928
- 124
929
- 125</pre>
905
+ 117</pre>
930
906
  </td>
931
907
  <td>
932
908
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
@@ -945,21 +921,21 @@
945
921
  </span> <span class='comment'># @return [Settings] The singleton instance of the settings.
946
922
  </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
947
923
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
948
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
924
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
949
925
  <span class='kw'>end</span>
950
926
 
951
927
  <span class='comment'># Initializes a new settings object.
952
928
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
953
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
954
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
929
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
930
+ <span class='id identifier rubyid_setup'>setup</span>
955
931
  <span class='kw'>end</span>
956
932
 
957
933
  <span class='comment'># Setups the current instance.
958
934
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
959
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
960
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
961
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
962
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
935
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
936
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
937
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
938
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
963
939
  <span class='kw'>end</span>
964
940
 
965
941
  <span class='comment'># Set the current locale for messages.
@@ -968,19 +944,19 @@
968
944
  </span> <span class='comment'># @return [R18n::Translation] The new translation object.
969
945
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_i18n='>i18n=</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
970
946
  <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
971
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
947
+ <span class='id identifier rubyid_setup'>setup</span>
972
948
  <span class='kw'>end</span>
973
949
 
974
950
  <span class='comment'># Setups formatters for a number.
975
951
  </span> <span class='comment'># @see Object#format_number
976
952
  </span> <span class='comment'>#
977
- </span> <span class='comment'># @param prec [Fixnum] The precision to show.
953
+ </span> <span class='comment'># @param precision [Fixnum] The precision to show.
978
954
  </span> <span class='comment'># @param decimal_separator [String] The string to use as decimal separator.
979
955
  </span> <span class='comment'># @param add_string [String] The string to append to the number.
980
956
  </span> <span class='comment'># @param k_separator [String] The string to use as thousands separator.
981
957
  </span> <span class='comment'># @return [Hash] The new formatters.
982
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
983
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
958
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
959
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
984
960
  <span class='kw'>end</span>
985
961
 
986
962
  <span class='comment'># Setups strings representation of booleans.
@@ -990,9 +966,7 @@
990
966
  </span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
991
967
  </span> <span class='comment'># @return [Hash] The new representations.
992
968
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
993
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
994
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
995
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
969
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
996
970
  <span class='kw'>end</span>
997
971
 
998
972
  <span class='comment'># Setups custom formats for dates and times.
@@ -1002,18 +976,10 @@
1002
976
  </span> <span class='comment'># @param replace [Boolean] If to discard current formats.
1003
977
  </span> <span class='comment'># @return [Hash] The new formats.
1004
978
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1005
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1006
-
1007
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
1008
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
1009
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1010
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
1011
- <span class='kw'>else</span>
1012
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
1013
- <span class='kw'>end</span>
979
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
1014
980
 
1015
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
1016
- <span class='kw'>end</span>
981
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
982
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
1017
983
 
1018
984
  <span class='ivar'>@date_formats</span>
1019
985
  <span class='kw'>end</span>
@@ -1029,12 +995,14 @@
1029
995
  </span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
1030
996
  </span> <span class='comment'># @return [Hash] The new representations.
1031
997
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1032
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1033
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1034
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1035
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1036
-
1037
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
998
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
999
+
1000
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1001
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1002
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1003
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
1004
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
1005
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
1038
1006
  <span class='kw'>end</span>
1039
1007
  <span class='kw'>end</span></pre>
1040
1008
  </td>
@@ -1183,15 +1151,7 @@
1183
1151
  114
1184
1152
  115
1185
1153
  116
1186
- 117
1187
- 118
1188
- 119
1189
- 120
1190
- 121
1191
- 122
1192
- 123
1193
- 124
1194
- 125</pre>
1154
+ 117</pre>
1195
1155
  </td>
1196
1156
  <td>
1197
1157
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
@@ -1210,21 +1170,21 @@
1210
1170
  </span> <span class='comment'># @return [Settings] The singleton instance of the settings.
1211
1171
  </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1212
1172
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
1213
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1173
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1214
1174
  <span class='kw'>end</span>
1215
1175
 
1216
1176
  <span class='comment'># Initializes a new settings object.
1217
1177
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
1218
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1219
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1178
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1179
+ <span class='id identifier rubyid_setup'>setup</span>
1220
1180
  <span class='kw'>end</span>
1221
1181
 
1222
1182
  <span class='comment'># Setups the current instance.
1223
1183
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
1224
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1225
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1226
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1227
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1184
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1185
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1186
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1187
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1228
1188
  <span class='kw'>end</span>
1229
1189
 
1230
1190
  <span class='comment'># Set the current locale for messages.
@@ -1233,19 +1193,19 @@
1233
1193
  </span> <span class='comment'># @return [R18n::Translation] The new translation object.
1234
1194
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_i18n='>i18n=</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1235
1195
  <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1236
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1196
+ <span class='id identifier rubyid_setup'>setup</span>
1237
1197
  <span class='kw'>end</span>
1238
1198
 
1239
1199
  <span class='comment'># Setups formatters for a number.
1240
1200
  </span> <span class='comment'># @see Object#format_number
1241
1201
  </span> <span class='comment'>#
1242
- </span> <span class='comment'># @param prec [Fixnum] The precision to show.
1202
+ </span> <span class='comment'># @param precision [Fixnum] The precision to show.
1243
1203
  </span> <span class='comment'># @param decimal_separator [String] The string to use as decimal separator.
1244
1204
  </span> <span class='comment'># @param add_string [String] The string to append to the number.
1245
1205
  </span> <span class='comment'># @param k_separator [String] The string to use as thousands separator.
1246
1206
  </span> <span class='comment'># @return [Hash] The new formatters.
1247
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1248
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
1207
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1208
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1249
1209
  <span class='kw'>end</span>
1250
1210
 
1251
1211
  <span class='comment'># Setups strings representation of booleans.
@@ -1255,9 +1215,7 @@
1255
1215
  </span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
1256
1216
  </span> <span class='comment'># @return [Hash] The new representations.
1257
1217
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1258
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1259
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
1260
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
1218
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
1261
1219
  <span class='kw'>end</span>
1262
1220
 
1263
1221
  <span class='comment'># Setups custom formats for dates and times.
@@ -1267,18 +1225,10 @@
1267
1225
  </span> <span class='comment'># @param replace [Boolean] If to discard current formats.
1268
1226
  </span> <span class='comment'># @return [Hash] The new formats.
1269
1227
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1270
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1271
-
1272
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
1273
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
1274
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1275
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
1276
- <span class='kw'>else</span>
1277
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
1278
- <span class='kw'>end</span>
1228
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
1279
1229
 
1280
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
1281
- <span class='kw'>end</span>
1230
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
1231
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
1282
1232
 
1283
1233
  <span class='ivar'>@date_formats</span>
1284
1234
  <span class='kw'>end</span>
@@ -1294,12 +1244,14 @@
1294
1244
  </span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
1295
1245
  </span> <span class='comment'># @return [Hash] The new representations.
1296
1246
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1297
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1298
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1299
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1300
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1301
-
1302
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
1247
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
1248
+
1249
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1250
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1251
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1252
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
1253
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
1254
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
1303
1255
  <span class='kw'>end</span>
1304
1256
  <span class='kw'>end</span></pre>
1305
1257
  </td>
@@ -1448,15 +1400,7 @@
1448
1400
  114
1449
1401
  115
1450
1402
  116
1451
- 117
1452
- 118
1453
- 119
1454
- 120
1455
- 121
1456
- 122
1457
- 123
1458
- 124
1459
- 125</pre>
1403
+ 117</pre>
1460
1404
  </td>
1461
1405
  <td>
1462
1406
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
@@ -1475,21 +1419,21 @@
1475
1419
  </span> <span class='comment'># @return [Settings] The singleton instance of the settings.
1476
1420
  </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1477
1421
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
1478
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1422
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1479
1423
  <span class='kw'>end</span>
1480
1424
 
1481
1425
  <span class='comment'># Initializes a new settings object.
1482
1426
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
1483
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1484
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1427
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1428
+ <span class='id identifier rubyid_setup'>setup</span>
1485
1429
  <span class='kw'>end</span>
1486
1430
 
1487
1431
  <span class='comment'># Setups the current instance.
1488
1432
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
1489
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1490
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1491
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1492
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1433
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1434
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1435
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1436
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1493
1437
  <span class='kw'>end</span>
1494
1438
 
1495
1439
  <span class='comment'># Set the current locale for messages.
@@ -1498,19 +1442,19 @@
1498
1442
  </span> <span class='comment'># @return [R18n::Translation] The new translation object.
1499
1443
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_i18n='>i18n=</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1500
1444
  <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1501
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1445
+ <span class='id identifier rubyid_setup'>setup</span>
1502
1446
  <span class='kw'>end</span>
1503
1447
 
1504
1448
  <span class='comment'># Setups formatters for a number.
1505
1449
  </span> <span class='comment'># @see Object#format_number
1506
1450
  </span> <span class='comment'>#
1507
- </span> <span class='comment'># @param prec [Fixnum] The precision to show.
1451
+ </span> <span class='comment'># @param precision [Fixnum] The precision to show.
1508
1452
  </span> <span class='comment'># @param decimal_separator [String] The string to use as decimal separator.
1509
1453
  </span> <span class='comment'># @param add_string [String] The string to append to the number.
1510
1454
  </span> <span class='comment'># @param k_separator [String] The string to use as thousands separator.
1511
1455
  </span> <span class='comment'># @return [Hash] The new formatters.
1512
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1513
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
1456
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1457
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1514
1458
  <span class='kw'>end</span>
1515
1459
 
1516
1460
  <span class='comment'># Setups strings representation of booleans.
@@ -1520,9 +1464,7 @@
1520
1464
  </span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
1521
1465
  </span> <span class='comment'># @return [Hash] The new representations.
1522
1466
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1523
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1524
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
1525
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
1467
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
1526
1468
  <span class='kw'>end</span>
1527
1469
 
1528
1470
  <span class='comment'># Setups custom formats for dates and times.
@@ -1532,18 +1474,10 @@
1532
1474
  </span> <span class='comment'># @param replace [Boolean] If to discard current formats.
1533
1475
  </span> <span class='comment'># @return [Hash] The new formats.
1534
1476
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1535
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1536
-
1537
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
1538
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
1539
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1540
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
1541
- <span class='kw'>else</span>
1542
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
1543
- <span class='kw'>end</span>
1477
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
1544
1478
 
1545
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
1546
- <span class='kw'>end</span>
1479
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
1480
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
1547
1481
 
1548
1482
  <span class='ivar'>@date_formats</span>
1549
1483
  <span class='kw'>end</span>
@@ -1559,12 +1493,14 @@
1559
1493
  </span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
1560
1494
  </span> <span class='comment'># @return [Hash] The new representations.
1561
1495
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1562
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1563
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1564
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1565
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1566
-
1567
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
1496
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
1497
+
1498
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1499
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1500
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1501
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
1502
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
1503
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
1568
1504
  <span class='kw'>end</span>
1569
1505
  <span class='kw'>end</span></pre>
1570
1506
  </td>
@@ -1713,15 +1649,7 @@
1713
1649
  114
1714
1650
  115
1715
1651
  116
1716
- 117
1717
- 118
1718
- 119
1719
- 120
1720
- 121
1721
- 122
1722
- 123
1723
- 124
1724
- 125</pre>
1652
+ 117</pre>
1725
1653
  </td>
1726
1654
  <td>
1727
1655
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
@@ -1740,21 +1668,21 @@
1740
1668
  </span> <span class='comment'># @return [Settings] The singleton instance of the settings.
1741
1669
  </span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1742
1670
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
1743
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1671
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1744
1672
  <span class='kw'>end</span>
1745
1673
 
1746
1674
  <span class='comment'># Initializes a new settings object.
1747
1675
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
1748
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1749
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1676
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:lazier</span><span class='comma'>,</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>
1677
+ <span class='id identifier rubyid_setup'>setup</span>
1750
1678
  <span class='kw'>end</span>
1751
1679
 
1752
1680
  <span class='comment'># Setups the current instance.
1753
1681
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
1754
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1755
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1756
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1757
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1682
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1683
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1684
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1685
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1758
1686
  <span class='kw'>end</span>
1759
1687
 
1760
1688
  <span class='comment'># Set the current locale for messages.
@@ -1763,19 +1691,19 @@
1763
1691
  </span> <span class='comment'># @return [R18n::Translation] The new translation object.
1764
1692
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_i18n='>i18n=</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1765
1693
  <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
1766
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup'>setup</span>
1694
+ <span class='id identifier rubyid_setup'>setup</span>
1767
1695
  <span class='kw'>end</span>
1768
1696
 
1769
1697
  <span class='comment'># Setups formatters for a number.
1770
1698
  </span> <span class='comment'># @see Object#format_number
1771
1699
  </span> <span class='comment'>#
1772
- </span> <span class='comment'># @param prec [Fixnum] The precision to show.
1700
+ </span> <span class='comment'># @param precision [Fixnum] The precision to show.
1773
1701
  </span> <span class='comment'># @param decimal_separator [String] The string to use as decimal separator.
1774
1702
  </span> <span class='comment'># @param add_string [String] The string to append to the number.
1775
1703
  </span> <span class='comment'># @param k_separator [String] The string to use as thousands separator.
1776
1704
  </span> <span class='comment'># @return [Hash] The new formatters.
1777
- </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1778
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
1705
+ </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1706
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1779
1707
  <span class='kw'>end</span>
1780
1708
 
1781
1709
  <span class='comment'># Setups strings representation of booleans.
@@ -1785,9 +1713,7 @@
1785
1713
  </span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
1786
1714
  </span> <span class='comment'># @return [Hash] The new representations.
1787
1715
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1788
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
1789
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
1790
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
1716
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
1791
1717
  <span class='kw'>end</span>
1792
1718
 
1793
1719
  <span class='comment'># Setups custom formats for dates and times.
@@ -1797,18 +1723,10 @@
1797
1723
  </span> <span class='comment'># @param replace [Boolean] If to discard current formats.
1798
1724
  </span> <span class='comment'># @return [Hash] The new formats.
1799
1725
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1800
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1726
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
1801
1727
 
1802
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
1803
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
1804
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
1805
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
1806
- <span class='kw'>else</span>
1807
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
1808
- <span class='kw'>end</span>
1809
-
1810
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
1811
- <span class='kw'>end</span>
1728
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
1729
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
1812
1730
 
1813
1731
  <span class='ivar'>@date_formats</span>
1814
1732
  <span class='kw'>end</span>
@@ -1824,12 +1742,14 @@
1824
1742
  </span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
1825
1743
  </span> <span class='comment'># @return [Hash] The new representations.
1826
1744
  </span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1827
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1828
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1829
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1830
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1831
-
1832
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
1745
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
1746
+
1747
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1748
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1749
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
1750
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
1751
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
1752
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
1833
1753
  <span class='kw'>end</span>
1834
1754
  <span class='kw'>end</span></pre>
1835
1755
  </td>
@@ -1917,7 +1837,7 @@
1917
1837
 
1918
1838
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1919
1839
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
1920
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1840
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1921
1841
  <span class='kw'>end</span></pre>
1922
1842
  </td>
1923
1843
  </tr>
@@ -1966,10 +1886,10 @@
1966
1886
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 44</span>
1967
1887
 
1968
1888
  <span class='kw'>def</span> <span class='id identifier rubyid_setup'>setup</span>
1969
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1970
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1971
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1972
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1889
+ <span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
1890
+ <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
1891
+ <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
1892
+ <span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
1973
1893
  <span class='kw'>end</span></pre>
1974
1894
  </td>
1975
1895
  </tr>
@@ -2065,17 +1985,13 @@
2065
1985
 
2066
1986
  78
2067
1987
  79
2068
- 80
2069
- 81
2070
- 82</pre>
1988
+ 80</pre>
2071
1989
  </td>
2072
1990
  <td>
2073
1991
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 78</span>
2074
1992
 
2075
1993
  <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2076
- <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
2077
- <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
2078
- <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
1994
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_boolean'>boolean</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbrace'>}</span>
2079
1995
  <span class='kw'>end</span></pre>
2080
1996
  </td>
2081
1997
  </tr>
@@ -2169,39 +2085,23 @@
2169
2085
  <pre class="lines">
2170
2086
 
2171
2087
 
2088
+ 88
2089
+ 89
2172
2090
  90
2173
2091
  91
2174
2092
  92
2175
2093
  93
2176
2094
  94
2177
- 95
2178
- 96
2179
- 97
2180
- 98
2181
- 99
2182
- 100
2183
- 101
2184
- 102
2185
- 103
2186
- 104
2187
- 105</pre>
2095
+ 95</pre>
2188
2096
  </td>
2189
2097
  <td>
2190
- <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 90</span>
2098
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 88</span>
2191
2099
 
2192
2100
  <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
2193
- <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
2101
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@date_formats</span>
2194
2102
 
2195
- <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
2196
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
2197
- <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
2198
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
2199
- <span class='kw'>else</span>
2200
- <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
2201
- <span class='kw'>end</span>
2202
-
2203
- <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
2204
- <span class='kw'>end</span>
2103
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
2104
+ <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='ivar'>@date_formats</span><span class='rparen'>)</span>
2205
2105
 
2206
2106
  <span class='ivar'>@date_formats</span>
2207
2107
  <span class='kw'>end</span></pre>
@@ -2335,25 +2235,29 @@
2335
2235
  <pre class="lines">
2336
2236
 
2337
2237
 
2338
- 117
2339
- 118
2340
- 119
2341
- 120
2342
- 121
2343
- 122
2344
- 123
2345
- 124</pre>
2238
+ 107
2239
+ 108
2240
+ 109
2241
+ 110
2242
+ 111
2243
+ 112
2244
+ 113
2245
+ 114
2246
+ 115
2247
+ 116</pre>
2346
2248
  </td>
2347
2249
  <td>
2348
- <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 117</span>
2250
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 107</span>
2349
2251
 
2350
2252
  <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2351
- <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
2352
- <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
2353
- <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
2354
- <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
2355
-
2356
- <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
2253
+ <span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_date'>date</span>
2254
+
2255
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
2256
+ <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_months'>long_months</span><span class='rparen'>)</span><span class='comma'>,</span>
2257
+ <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_months'>short_months</span><span class='rparen'>)</span><span class='comma'>,</span>
2258
+ <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_long_days'>long_days</span><span class='rparen'>)</span><span class='comma'>,</span>
2259
+ <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_ensure'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_definitions'>definitions</span><span class='period'>.</span><span class='id identifier rubyid_short_days'>short_days</span><span class='rparen'>)</span>
2260
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_with_indifferent_access'>with_indifferent_access</span>
2357
2261
  <span class='kw'>end</span></pre>
2358
2262
  </td>
2359
2263
  </tr>
@@ -2363,7 +2267,7 @@
2363
2267
  <div class="method_details ">
2364
2268
  <h3 class="signature " id="setup_format_number-instance_method">
2365
2269
 
2366
- - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_format_number</strong>(prec = 2, decimal_separator = &quot;.&quot;, add_string = &quot;&quot;, k_separator = &quot;,&quot;)
2270
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_format_number</strong>(precision = 2, decimal_separator = &quot;.&quot;, add_string = nil, k_separator = &quot;,&quot;)
2367
2271
 
2368
2272
 
2369
2273
 
@@ -2382,7 +2286,7 @@
2382
2286
 
2383
2287
  <li>
2384
2288
 
2385
- <span class='name'>prec</span>
2289
+ <span class='name'>precision</span>
2386
2290
 
2387
2291
 
2388
2292
  <span class='type'>(<tt>Fixnum</tt>)</span>
@@ -2422,7 +2326,7 @@
2422
2326
  <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
2423
2327
 
2424
2328
 
2425
- <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
2329
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2426
2330
 
2427
2331
 
2428
2332
  &mdash;
@@ -2488,8 +2392,8 @@
2488
2392
  <td>
2489
2393
  <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 68</span>
2490
2394
 
2491
- <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2492
- <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
2395
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2396
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2493
2397
  <span class='kw'>end</span></pre>
2494
2398
  </td>
2495
2399
  </tr>
@@ -2501,9 +2405,9 @@
2501
2405
  </div>
2502
2406
 
2503
2407
  <div id="footer">
2504
- Generated on Sat Apr 13 11:56:54 2013 by
2408
+ Generated on Fri May 17 12:03:22 2013 by
2505
2409
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2506
- 0.8.5.2 (ruby-1.9.3).
2410
+ 0.8.6.1 (ruby-1.9.3).
2507
2411
  </div>
2508
2412
 
2509
2413
  </body>