lazier 4.1.0 → 4.2.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.
- checksums.yaml +4 -4
- data/.travis-gemfile +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +6 -6
- data/README.md +1 -1
- data/doc/Lazier.html +185 -70
- data/doc/Lazier/Boolean.html +5 -5
- data/doc/Lazier/Configuration.html +78 -16
- data/doc/Lazier/DateTime.html +13 -12
- data/doc/Lazier/DateTime/ClassMethods.html +6 -6
- data/doc/Lazier/Exceptions.html +3 -3
- data/doc/Lazier/Exceptions/Debug.html +3 -3
- data/doc/Lazier/Exceptions/MissingTranslation.html +9 -9
- data/doc/Lazier/Exceptions/TranslationExceptionHandler.html +73 -9
- data/doc/Lazier/Hash.html +7 -7
- data/doc/Lazier/I18n.html +41 -41
- data/doc/Lazier/Math.html +4 -4
- data/doc/Lazier/Math/ClassMethods.html +7 -7
- data/doc/Lazier/Object.html +29 -26
- data/doc/Lazier/Pathname.html +11 -12
- data/doc/Lazier/Settings.html +63 -63
- data/doc/Lazier/String.html +122 -21
- data/doc/Lazier/TimeZone.html +128 -32
- data/doc/Lazier/TimeZone/ClassMethods.html +5 -5
- data/doc/Lazier/Version.html +4 -4
- data/doc/_index.html +4 -4
- data/doc/class_list.html +5 -1
- data/doc/file.README.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +4 -4
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +91 -81
- data/doc/top-level-namespace.html +3 -3
- data/lib/lazier.rb +18 -17
- data/lib/lazier/boolean.rb +1 -1
- data/lib/lazier/configuration.rb +6 -6
- data/lib/lazier/datetime.rb +11 -11
- data/lib/lazier/exceptions.rb +7 -2
- data/lib/lazier/hash.rb +4 -4
- data/lib/lazier/i18n.rb +7 -7
- data/lib/lazier/math.rb +3 -3
- data/lib/lazier/object.rb +17 -15
- data/lib/lazier/pathname.rb +3 -5
- data/lib/lazier/settings.rb +10 -10
- data/lib/lazier/string.rb +10 -1
- data/lib/lazier/timezone.rb +23 -25
- data/lib/lazier/version.rb +1 -1
- data/spec/lazier/string_spec.rb +14 -0
- data/spec/spec_helper.rb +1 -8
- metadata +2 -2
data/doc/Lazier/Pathname.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Pathname
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
92
92
|
<div class="discussion">
|
93
|
-
<p>Extensions for the Pathname class.</p>
|
93
|
+
<p>Extensions for the <code>Pathname</code> class.</p>
|
94
94
|
|
95
95
|
|
96
96
|
</div>
|
@@ -159,10 +159,9 @@
|
|
159
159
|
<div class="discussion">
|
160
160
|
<p>Returns all the components that are included in this path.</p>
|
161
161
|
|
162
|
-
<
|
163
|
-
|
164
|
-
|
165
|
-
</code></p>
|
162
|
+
<pre class="code ruby"><code class="ruby"><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/usr/bin/ruby</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
|
163
|
+
<span class='comment'># => ["usr", "bin", "ruby"]
|
164
|
+
</span></code></pre>
|
166
165
|
|
167
166
|
|
168
167
|
</div>
|
@@ -193,12 +192,12 @@ Pathname.new("/usr/bin/ruby").components
|
|
193
192
|
<pre class="lines">
|
194
193
|
|
195
194
|
|
196
|
-
|
197
|
-
|
198
|
-
|
195
|
+
17
|
196
|
+
18
|
197
|
+
19</pre>
|
199
198
|
</td>
|
200
199
|
<td>
|
201
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line
|
200
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 17</span>
|
202
201
|
|
203
202
|
<span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
|
204
203
|
<span class='id identifier rubyid_each_filename'>each_filename</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
|
@@ -213,9 +212,9 @@ Pathname.new("/usr/bin/ruby").components
|
|
213
212
|
</div>
|
214
213
|
|
215
214
|
<div id="footer">
|
216
|
-
Generated on
|
215
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
217
216
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
218
|
-
0.8.7.
|
217
|
+
0.8.7.6 (ruby-2.1.3).
|
219
218
|
</div>
|
220
219
|
|
221
220
|
</body>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Lazier::Settings
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -650,7 +650,7 @@
|
|
650
650
|
|
651
651
|
<span class='comment'># Returns the singleton instance of the settings.
|
652
652
|
</span> <span class='comment'>#
|
653
|
-
</span> <span class='comment'># @param force [Boolean]
|
653
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
654
654
|
</span> <span class='comment'># @return [Settings] The singleton instance of the settings.
|
655
655
|
</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>
|
656
656
|
<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>
|
@@ -689,8 +689,8 @@
|
|
689
689
|
<span class='comment'># Setups strings representation of booleans.
|
690
690
|
</span> <span class='comment'># @see Object#format_boolean
|
691
691
|
</span> <span class='comment'>#
|
692
|
-
</span> <span class='comment'># @param true_name [String] The string representation of `true`. Defaults to `Yes`.
|
693
|
-
</span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
|
692
|
+
</span> <span class='comment'># @param true_name [String|NilClass] The string representation of `true`. Defaults to `Yes`.
|
693
|
+
</span> <span class='comment'># @param false_name [String|NilClass] The string representation of `false`. Defaults to `No`.
|
694
694
|
</span> <span class='comment'># @return [Hash] The new representations.
|
695
695
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='label'>true_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>false_name:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
696
696
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_translate'>translate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -700,8 +700,8 @@
|
|
700
700
|
<span class='comment'># Setups custom formats for dates and times.
|
701
701
|
</span> <span class='comment'># @see DateTime#lstrftime
|
702
702
|
</span> <span class='comment'>#
|
703
|
-
</span> <span class='comment'># @param formats [Hash] The format to add or replace.
|
704
|
-
</span> <span class='comment'># @param replace [Boolean]
|
703
|
+
</span> <span class='comment'># @param formats [Hash|NilClass] The format to add or replace.
|
704
|
+
</span> <span class='comment'># @param replace [Boolean] Whether to discard current formats.
|
705
705
|
</span> <span class='comment'># @return [Hash] The new formats.
|
706
706
|
</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>
|
707
707
|
<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>
|
@@ -716,12 +716,12 @@
|
|
716
716
|
<span class='comment'># Setups strings representation of days and months.
|
717
717
|
</span> <span class='comment'># @see DateTime::ClassMethods#days
|
718
718
|
</span> <span class='comment'># @see DateTime::ClassMethods#months
|
719
|
-
</span> <span class='comment'># @see DateTime#
|
719
|
+
</span> <span class='comment'># @see Lazier::DateTime#format
|
720
720
|
</span> <span class='comment'>#
|
721
|
-
</span> <span class='comment'># @param long_months [Array] The string representation of months.
|
722
|
-
</span> <span class='comment'># @param short_months [Array] The abbreviated string representation of months.
|
723
|
-
</span> <span class='comment'># @param long_days [Array] The string representation of days.
|
724
|
-
</span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
|
721
|
+
</span> <span class='comment'># @param long_months [Array|NilClass] The string representation of months.
|
722
|
+
</span> <span class='comment'># @param short_months [Array|NilClass] The abbreviated string representation of months.
|
723
|
+
</span> <span class='comment'># @param long_days [Array|NilClass] The string representation of days.
|
724
|
+
</span> <span class='comment'># @param short_days [Array|NilClass] The abbreviated string representation of days.
|
725
725
|
</span> <span class='comment'># @return [Hash] The new representations.
|
726
726
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='label'>long_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
727
727
|
<span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_definitions'>prepare_definitions</span>
|
@@ -905,7 +905,7 @@
|
|
905
905
|
|
906
906
|
<span class='comment'># Returns the singleton instance of the settings.
|
907
907
|
</span> <span class='comment'>#
|
908
|
-
</span> <span class='comment'># @param force [Boolean]
|
908
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
909
909
|
</span> <span class='comment'># @return [Settings] The singleton instance of the settings.
|
910
910
|
</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>
|
911
911
|
<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>
|
@@ -944,8 +944,8 @@
|
|
944
944
|
<span class='comment'># Setups strings representation of booleans.
|
945
945
|
</span> <span class='comment'># @see Object#format_boolean
|
946
946
|
</span> <span class='comment'>#
|
947
|
-
</span> <span class='comment'># @param true_name [String] The string representation of `true`. Defaults to `Yes`.
|
948
|
-
</span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
|
947
|
+
</span> <span class='comment'># @param true_name [String|NilClass] The string representation of `true`. Defaults to `Yes`.
|
948
|
+
</span> <span class='comment'># @param false_name [String|NilClass] The string representation of `false`. Defaults to `No`.
|
949
949
|
</span> <span class='comment'># @return [Hash] The new representations.
|
950
950
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='label'>true_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>false_name:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
951
951
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_translate'>translate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -955,8 +955,8 @@
|
|
955
955
|
<span class='comment'># Setups custom formats for dates and times.
|
956
956
|
</span> <span class='comment'># @see DateTime#lstrftime
|
957
957
|
</span> <span class='comment'>#
|
958
|
-
</span> <span class='comment'># @param formats [Hash] The format to add or replace.
|
959
|
-
</span> <span class='comment'># @param replace [Boolean]
|
958
|
+
</span> <span class='comment'># @param formats [Hash|NilClass] The format to add or replace.
|
959
|
+
</span> <span class='comment'># @param replace [Boolean] Whether to discard current formats.
|
960
960
|
</span> <span class='comment'># @return [Hash] The new formats.
|
961
961
|
</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>
|
962
962
|
<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>
|
@@ -971,12 +971,12 @@
|
|
971
971
|
<span class='comment'># Setups strings representation of days and months.
|
972
972
|
</span> <span class='comment'># @see DateTime::ClassMethods#days
|
973
973
|
</span> <span class='comment'># @see DateTime::ClassMethods#months
|
974
|
-
</span> <span class='comment'># @see DateTime#
|
974
|
+
</span> <span class='comment'># @see Lazier::DateTime#format
|
975
975
|
</span> <span class='comment'>#
|
976
|
-
</span> <span class='comment'># @param long_months [Array] The string representation of months.
|
977
|
-
</span> <span class='comment'># @param short_months [Array] The abbreviated string representation of months.
|
978
|
-
</span> <span class='comment'># @param long_days [Array] The string representation of days.
|
979
|
-
</span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
|
976
|
+
</span> <span class='comment'># @param long_months [Array|NilClass] The string representation of months.
|
977
|
+
</span> <span class='comment'># @param short_months [Array|NilClass] The abbreviated string representation of months.
|
978
|
+
</span> <span class='comment'># @param long_days [Array|NilClass] The string representation of days.
|
979
|
+
</span> <span class='comment'># @param short_days [Array|NilClass] The abbreviated string representation of days.
|
980
980
|
</span> <span class='comment'># @return [Hash] The new representations.
|
981
981
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='label'>long_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
982
982
|
<span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_definitions'>prepare_definitions</span>
|
@@ -1160,7 +1160,7 @@
|
|
1160
1160
|
|
1161
1161
|
<span class='comment'># Returns the singleton instance of the settings.
|
1162
1162
|
</span> <span class='comment'>#
|
1163
|
-
</span> <span class='comment'># @param force [Boolean]
|
1163
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1164
1164
|
</span> <span class='comment'># @return [Settings] The singleton instance of the settings.
|
1165
1165
|
</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>
|
1166
1166
|
<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>
|
@@ -1199,8 +1199,8 @@
|
|
1199
1199
|
<span class='comment'># Setups strings representation of booleans.
|
1200
1200
|
</span> <span class='comment'># @see Object#format_boolean
|
1201
1201
|
</span> <span class='comment'>#
|
1202
|
-
</span> <span class='comment'># @param true_name [String] The string representation of `true`. Defaults to `Yes`.
|
1203
|
-
</span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
|
1202
|
+
</span> <span class='comment'># @param true_name [String|NilClass] The string representation of `true`. Defaults to `Yes`.
|
1203
|
+
</span> <span class='comment'># @param false_name [String|NilClass] The string representation of `false`. Defaults to `No`.
|
1204
1204
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1205
1205
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='label'>true_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>false_name:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1206
1206
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_translate'>translate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -1210,8 +1210,8 @@
|
|
1210
1210
|
<span class='comment'># Setups custom formats for dates and times.
|
1211
1211
|
</span> <span class='comment'># @see DateTime#lstrftime
|
1212
1212
|
</span> <span class='comment'>#
|
1213
|
-
</span> <span class='comment'># @param formats [Hash] The format to add or replace.
|
1214
|
-
</span> <span class='comment'># @param replace [Boolean]
|
1213
|
+
</span> <span class='comment'># @param formats [Hash|NilClass] The format to add or replace.
|
1214
|
+
</span> <span class='comment'># @param replace [Boolean] Whether to discard current formats.
|
1215
1215
|
</span> <span class='comment'># @return [Hash] The new formats.
|
1216
1216
|
</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>
|
1217
1217
|
<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>
|
@@ -1226,12 +1226,12 @@
|
|
1226
1226
|
<span class='comment'># Setups strings representation of days and months.
|
1227
1227
|
</span> <span class='comment'># @see DateTime::ClassMethods#days
|
1228
1228
|
</span> <span class='comment'># @see DateTime::ClassMethods#months
|
1229
|
-
</span> <span class='comment'># @see DateTime#
|
1229
|
+
</span> <span class='comment'># @see Lazier::DateTime#format
|
1230
1230
|
</span> <span class='comment'>#
|
1231
|
-
</span> <span class='comment'># @param long_months [Array] The string representation of months.
|
1232
|
-
</span> <span class='comment'># @param short_months [Array] The abbreviated string representation of months.
|
1233
|
-
</span> <span class='comment'># @param long_days [Array] The string representation of days.
|
1234
|
-
</span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
|
1231
|
+
</span> <span class='comment'># @param long_months [Array|NilClass] The string representation of months.
|
1232
|
+
</span> <span class='comment'># @param short_months [Array|NilClass] The abbreviated string representation of months.
|
1233
|
+
</span> <span class='comment'># @param long_days [Array|NilClass] The string representation of days.
|
1234
|
+
</span> <span class='comment'># @param short_days [Array|NilClass] The abbreviated string representation of days.
|
1235
1235
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1236
1236
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='label'>long_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1237
1237
|
<span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_definitions'>prepare_definitions</span>
|
@@ -1415,7 +1415,7 @@
|
|
1415
1415
|
|
1416
1416
|
<span class='comment'># Returns the singleton instance of the settings.
|
1417
1417
|
</span> <span class='comment'>#
|
1418
|
-
</span> <span class='comment'># @param force [Boolean]
|
1418
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1419
1419
|
</span> <span class='comment'># @return [Settings] The singleton instance of the settings.
|
1420
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>
|
1421
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>
|
@@ -1454,8 +1454,8 @@
|
|
1454
1454
|
<span class='comment'># Setups strings representation of booleans.
|
1455
1455
|
</span> <span class='comment'># @see Object#format_boolean
|
1456
1456
|
</span> <span class='comment'>#
|
1457
|
-
</span> <span class='comment'># @param true_name [String] The string representation of `true`. Defaults to `Yes`.
|
1458
|
-
</span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
|
1457
|
+
</span> <span class='comment'># @param true_name [String|NilClass] The string representation of `true`. Defaults to `Yes`.
|
1458
|
+
</span> <span class='comment'># @param false_name [String|NilClass] The string representation of `false`. Defaults to `No`.
|
1459
1459
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1460
1460
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='label'>true_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>false_name:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1461
1461
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_translate'>translate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -1465,8 +1465,8 @@
|
|
1465
1465
|
<span class='comment'># Setups custom formats for dates and times.
|
1466
1466
|
</span> <span class='comment'># @see DateTime#lstrftime
|
1467
1467
|
</span> <span class='comment'>#
|
1468
|
-
</span> <span class='comment'># @param formats [Hash] The format to add or replace.
|
1469
|
-
</span> <span class='comment'># @param replace [Boolean]
|
1468
|
+
</span> <span class='comment'># @param formats [Hash|NilClass] The format to add or replace.
|
1469
|
+
</span> <span class='comment'># @param replace [Boolean] Whether to discard current formats.
|
1470
1470
|
</span> <span class='comment'># @return [Hash] The new formats.
|
1471
1471
|
</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>
|
1472
1472
|
<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>
|
@@ -1481,12 +1481,12 @@
|
|
1481
1481
|
<span class='comment'># Setups strings representation of days and months.
|
1482
1482
|
</span> <span class='comment'># @see DateTime::ClassMethods#days
|
1483
1483
|
</span> <span class='comment'># @see DateTime::ClassMethods#months
|
1484
|
-
</span> <span class='comment'># @see DateTime#
|
1484
|
+
</span> <span class='comment'># @see Lazier::DateTime#format
|
1485
1485
|
</span> <span class='comment'>#
|
1486
|
-
</span> <span class='comment'># @param long_months [Array] The string representation of months.
|
1487
|
-
</span> <span class='comment'># @param short_months [Array] The abbreviated string representation of months.
|
1488
|
-
</span> <span class='comment'># @param long_days [Array] The string representation of days.
|
1489
|
-
</span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
|
1486
|
+
</span> <span class='comment'># @param long_months [Array|NilClass] The string representation of months.
|
1487
|
+
</span> <span class='comment'># @param short_months [Array|NilClass] The abbreviated string representation of months.
|
1488
|
+
</span> <span class='comment'># @param long_days [Array|NilClass] The string representation of days.
|
1489
|
+
</span> <span class='comment'># @param short_days [Array|NilClass] The abbreviated string representation of days.
|
1490
1490
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1491
1491
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='label'>long_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1492
1492
|
<span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_definitions'>prepare_definitions</span>
|
@@ -1670,7 +1670,7 @@
|
|
1670
1670
|
|
1671
1671
|
<span class='comment'># Returns the singleton instance of the settings.
|
1672
1672
|
</span> <span class='comment'>#
|
1673
|
-
</span> <span class='comment'># @param force [Boolean]
|
1673
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1674
1674
|
</span> <span class='comment'># @return [Settings] The singleton instance of the settings.
|
1675
1675
|
</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>
|
1676
1676
|
<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>
|
@@ -1709,8 +1709,8 @@
|
|
1709
1709
|
<span class='comment'># Setups strings representation of booleans.
|
1710
1710
|
</span> <span class='comment'># @see Object#format_boolean
|
1711
1711
|
</span> <span class='comment'>#
|
1712
|
-
</span> <span class='comment'># @param true_name [String] The string representation of `true`. Defaults to `Yes`.
|
1713
|
-
</span> <span class='comment'># @param false_name [String] The string representation of `false`. Defaults to `No`.
|
1712
|
+
</span> <span class='comment'># @param true_name [String|NilClass] The string representation of `true`. Defaults to `Yes`.
|
1713
|
+
</span> <span class='comment'># @param false_name [String|NilClass] The string representation of `false`. Defaults to `No`.
|
1714
1714
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1715
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='label'>true_name:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>false_name:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1716
1716
|
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_translate'>translate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -1720,8 +1720,8 @@
|
|
1720
1720
|
<span class='comment'># Setups custom formats for dates and times.
|
1721
1721
|
</span> <span class='comment'># @see DateTime#lstrftime
|
1722
1722
|
</span> <span class='comment'>#
|
1723
|
-
</span> <span class='comment'># @param formats [Hash] The format to add or replace.
|
1724
|
-
</span> <span class='comment'># @param replace [Boolean]
|
1723
|
+
</span> <span class='comment'># @param formats [Hash|NilClass] The format to add or replace.
|
1724
|
+
</span> <span class='comment'># @param replace [Boolean] Whether to discard current formats.
|
1725
1725
|
</span> <span class='comment'># @return [Hash] The new formats.
|
1726
1726
|
</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>
|
1727
1727
|
<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>
|
@@ -1736,12 +1736,12 @@
|
|
1736
1736
|
<span class='comment'># Setups strings representation of days and months.
|
1737
1737
|
</span> <span class='comment'># @see DateTime::ClassMethods#days
|
1738
1738
|
</span> <span class='comment'># @see DateTime::ClassMethods#months
|
1739
|
-
</span> <span class='comment'># @see DateTime#
|
1739
|
+
</span> <span class='comment'># @see Lazier::DateTime#format
|
1740
1740
|
</span> <span class='comment'>#
|
1741
|
-
</span> <span class='comment'># @param long_months [Array] The string representation of months.
|
1742
|
-
</span> <span class='comment'># @param short_months [Array] The abbreviated string representation of months.
|
1743
|
-
</span> <span class='comment'># @param long_days [Array] The string representation of days.
|
1744
|
-
</span> <span class='comment'># @param short_days [Array] The abbreviated string representation of days.
|
1741
|
+
</span> <span class='comment'># @param long_months [Array|NilClass] The string representation of months.
|
1742
|
+
</span> <span class='comment'># @param short_months [Array|NilClass] The abbreviated string representation of months.
|
1743
|
+
</span> <span class='comment'># @param long_days [Array|NilClass] The string representation of days.
|
1744
|
+
</span> <span class='comment'># @param short_days [Array|NilClass] The abbreviated string representation of days.
|
1745
1745
|
</span> <span class='comment'># @return [Hash] The new representations.
|
1746
1746
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='label'>long_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1747
1747
|
<span class='id identifier rubyid_definitions'>definitions</span> <span class='op'>=</span> <span class='id identifier rubyid_prepare_definitions'>prepare_definitions</span>
|
@@ -1810,7 +1810,7 @@
|
|
1810
1810
|
|
1811
1811
|
|
1812
1812
|
—
|
1813
|
-
<div class='inline'><p>
|
1813
|
+
<div class='inline'><p>Whether to force recreation of the instance.</p>
|
1814
1814
|
</div>
|
1815
1815
|
|
1816
1816
|
</li>
|
@@ -1935,7 +1935,7 @@
|
|
1935
1935
|
<span class='name'>true_name</span>
|
1936
1936
|
|
1937
1937
|
|
1938
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1938
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1939
1939
|
|
1940
1940
|
|
1941
1941
|
|
@@ -1950,7 +1950,7 @@
|
|
1950
1950
|
<span class='name'>false_name</span>
|
1951
1951
|
|
1952
1952
|
|
1953
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1953
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1954
1954
|
|
1955
1955
|
|
1956
1956
|
|
@@ -2035,7 +2035,7 @@
|
|
2035
2035
|
<span class='name'>formats</span>
|
2036
2036
|
|
2037
2037
|
|
2038
|
-
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span
|
2038
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span>|NilClass</tt>)</span>
|
2039
2039
|
|
2040
2040
|
|
2041
2041
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
@@ -2059,7 +2059,7 @@
|
|
2059
2059
|
|
2060
2060
|
|
2061
2061
|
—
|
2062
|
-
<div class='inline'><p>
|
2062
|
+
<div class='inline'><p>Whether to discard current formats.</p>
|
2063
2063
|
</div>
|
2064
2064
|
|
2065
2065
|
</li>
|
@@ -2149,7 +2149,7 @@
|
|
2149
2149
|
<span class='name'>long_months</span>
|
2150
2150
|
|
2151
2151
|
|
2152
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
2152
|
+
<span class='type'>(<tt>Array|NilClass</tt>)</span>
|
2153
2153
|
|
2154
2154
|
|
2155
2155
|
|
@@ -2164,7 +2164,7 @@
|
|
2164
2164
|
<span class='name'>short_months</span>
|
2165
2165
|
|
2166
2166
|
|
2167
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
2167
|
+
<span class='type'>(<tt>Array|NilClass</tt>)</span>
|
2168
2168
|
|
2169
2169
|
|
2170
2170
|
|
@@ -2179,7 +2179,7 @@
|
|
2179
2179
|
<span class='name'>long_days</span>
|
2180
2180
|
|
2181
2181
|
|
2182
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
2182
|
+
<span class='type'>(<tt>Array|NilClass</tt>)</span>
|
2183
2183
|
|
2184
2184
|
|
2185
2185
|
|
@@ -2194,7 +2194,7 @@
|
|
2194
2194
|
<span class='name'>short_days</span>
|
2195
2195
|
|
2196
2196
|
|
2197
|
-
<span class='type'>(<tt>Array</tt>)</span>
|
2197
|
+
<span class='type'>(<tt>Array|NilClass</tt>)</span>
|
2198
2198
|
|
2199
2199
|
|
2200
2200
|
|
@@ -2231,7 +2231,7 @@
|
|
2231
2231
|
|
2232
2232
|
<li><span class='object_link'><a href="DateTime/ClassMethods.html#months-instance_method" title="Lazier::DateTime::ClassMethods#months (method)">DateTime::ClassMethods#months</a></span></li>
|
2233
2233
|
|
2234
|
-
<li>DateTime#
|
2234
|
+
<li><span class='object_link'><a href="DateTime.html#format-instance_method" title="Lazier::DateTime#format (method)">DateTime#format</a></span></li>
|
2235
2235
|
|
2236
2236
|
</ul>
|
2237
2237
|
|
@@ -2413,9 +2413,9 @@
|
|
2413
2413
|
</div>
|
2414
2414
|
|
2415
2415
|
<div id="footer">
|
2416
|
-
Generated on
|
2416
|
+
Generated on Sun Nov 2 11:08:45 2014 by
|
2417
2417
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2418
|
-
0.8.7.
|
2418
|
+
0.8.7.6 (ruby-2.1.3).
|
2419
2419
|
</div>
|
2420
2420
|
|
2421
2421
|
</body>
|
data/doc/Lazier/String.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::String
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
92
92
|
<div class="discussion">
|
93
|
-
<p>Extensions for the String class.</p>
|
93
|
+
<p>Extensions for the <code>String</code> class.</p>
|
94
94
|
|
95
95
|
|
96
96
|
</div>
|
@@ -116,6 +116,29 @@
|
|
116
116
|
<li class="public ">
|
117
117
|
<span class="summary_signature">
|
118
118
|
|
119
|
+
<a href="#ensure_url_with_scheme-instance_method" title="#ensure_url_with_scheme (instance method)">- (Object) <strong>ensure_url_with_scheme</strong>(protocol = "http", secure: false) </a>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
</span>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="summary_desc"><div class='inline'><p>Makes sure the string starts with the scheme for the specified protocol.</p>
|
134
|
+
</div></span>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
119
142
|
<a href="#ensure_valid_utf8-instance_method" title="#ensure_valid_utf8 (instance method)">- (String) <strong>ensure_valid_utf8</strong>(replacement = "") </a>
|
120
143
|
|
121
144
|
|
@@ -216,7 +239,85 @@
|
|
216
239
|
|
217
240
|
|
218
241
|
<div class="method_details first">
|
219
|
-
<h3 class="signature first" id="
|
242
|
+
<h3 class="signature first" id="ensure_url_with_scheme-instance_method">
|
243
|
+
|
244
|
+
- (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>ensure_url_with_scheme</strong>(protocol = "http", secure: false)
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
</h3><div class="docstring">
|
251
|
+
<div class="discussion">
|
252
|
+
<p>Makes sure the string starts with the scheme for the specified protocol.</p>
|
253
|
+
|
254
|
+
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
<div class="tags">
|
258
|
+
<p class="tag_title">Parameters:</p>
|
259
|
+
<ul class="param">
|
260
|
+
|
261
|
+
<li>
|
262
|
+
|
263
|
+
<span class='name'>protocol</span>
|
264
|
+
|
265
|
+
|
266
|
+
<span class='type'>(<tt><span class='object_link'><a href="" title="Lazier::String (module)">String</a></span></tt>)</span>
|
267
|
+
|
268
|
+
|
269
|
+
<em class="default">(defaults to: <tt>"http"</tt>)</em>
|
270
|
+
|
271
|
+
|
272
|
+
—
|
273
|
+
<div class='inline'><p>The protocol for the URL.</p>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
</li>
|
277
|
+
|
278
|
+
<li>
|
279
|
+
|
280
|
+
<span class='name'>secure</span>
|
281
|
+
|
282
|
+
|
283
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
—
|
288
|
+
<div class='inline'><p>If the scheme should be secure or not.</p>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
</li>
|
292
|
+
|
293
|
+
</ul>
|
294
|
+
|
295
|
+
|
296
|
+
</div><table class="source_code">
|
297
|
+
<tr>
|
298
|
+
<td>
|
299
|
+
<pre class="lines">
|
300
|
+
|
301
|
+
|
302
|
+
24
|
303
|
+
25
|
304
|
+
26
|
305
|
+
27</pre>
|
306
|
+
</td>
|
307
|
+
<td>
|
308
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 24</span>
|
309
|
+
|
310
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ensure_url_with_scheme'>ensure_url_with_scheme</span><span class='lparen'>(</span><span class='id identifier rubyid_protocol'>protocol</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>http</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>secure:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
311
|
+
<span class='id identifier rubyid_schema'>schema</span> <span class='op'>=</span> <span class='id identifier rubyid_protocol'>protocol</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_secure'>secure</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>s</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
312
|
+
<span class='kw'>self</span> <span class='op'>!~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_protocol'>protocol</span><span class='embexpr_end'>}</span><span class='tstring_content'>(s?):\/\/)</span><span class='regexp_end'>/</span></span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_schema'>schema</span><span class='embexpr_end'>}</span><span class='tstring_content'>://</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='kw'>self</span>
|
313
|
+
<span class='kw'>end</span></pre>
|
314
|
+
</td>
|
315
|
+
</tr>
|
316
|
+
</table>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
<div class="method_details ">
|
320
|
+
<h3 class="signature " id="ensure_valid_utf8-instance_method">
|
220
321
|
|
221
322
|
- (<tt><span class='object_link'><a href="" title="Lazier::String (module)">String</a></span></tt>) <strong>ensure_valid_utf8</strong>(replacement = "")
|
222
323
|
|
@@ -342,12 +443,12 @@
|
|
342
443
|
<pre class="lines">
|
343
444
|
|
344
445
|
|
345
|
-
|
346
|
-
|
347
|
-
|
446
|
+
60
|
447
|
+
61
|
448
|
+
62</pre>
|
348
449
|
</td>
|
349
450
|
<td>
|
350
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line
|
451
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 60</span>
|
351
452
|
|
352
453
|
<span class='kw'>def</span> <span class='id identifier rubyid_remove_accents'>remove_accents</span>
|
353
454
|
<span class='op'>::</span><span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_transliterate'>transliterate</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
@@ -478,16 +579,16 @@
|
|
478
579
|
<pre class="lines">
|
479
580
|
|
480
581
|
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
582
|
+
44
|
583
|
+
45
|
584
|
+
46
|
585
|
+
47
|
586
|
+
48
|
587
|
+
49
|
588
|
+
50</pre>
|
488
589
|
</td>
|
489
590
|
<td>
|
490
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line
|
591
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 44</span>
|
491
592
|
|
492
593
|
<span class='kw'>def</span> <span class='id identifier rubyid_tokenize'>tokenize</span><span class='lparen'>(</span><span class='label'>no_blanks:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>strip:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>no_duplicates:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>pattern:</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\s*,\s*</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='label'>presence_method:</span> <span class='symbol'>:present?</span><span class='rparen'>)</span>
|
493
594
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='id identifier rubyid_pattern'>pattern</span><span class='rparen'>)</span>
|
@@ -543,12 +644,12 @@
|
|
543
644
|
<pre class="lines">
|
544
645
|
|
545
646
|
|
546
|
-
|
547
|
-
|
548
|
-
|
647
|
+
32
|
648
|
+
33
|
649
|
+
34</pre>
|
549
650
|
</td>
|
550
651
|
<td>
|
551
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line
|
652
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 32</span>
|
552
653
|
|
553
654
|
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
554
655
|
<span class='kw'>self</span>
|
@@ -563,9 +664,9 @@
|
|
563
664
|
</div>
|
564
665
|
|
565
666
|
<div id="footer">
|
566
|
-
Generated on
|
667
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
567
668
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
568
|
-
0.8.7.
|
669
|
+
0.8.7.6 (ruby-2.1.3).
|
569
670
|
</div>
|
570
671
|
|
571
672
|
</body>
|