facets 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -1
- data/CHANGES +25 -5
- data/MANIFEST +67 -34
- data/METADATA +2 -2
- data/NEWS +54 -46
- data/doc/news/NEWS-2.4.0 +52 -0
- data/doc/rdoc/core/classes/Array.html +198 -198
- data/doc/rdoc/core/classes/Binding.html +86 -192
- data/doc/rdoc/core/classes/Class.html +136 -136
- data/doc/rdoc/core/classes/Comparable.html +45 -45
- data/doc/rdoc/core/classes/Dir.html +64 -64
- data/doc/rdoc/core/classes/Enumerable.html +287 -281
- data/doc/rdoc/core/classes/Exception.html +16 -16
- data/doc/rdoc/core/classes/FalseClass.html +8 -8
- data/doc/rdoc/core/classes/File.html +100 -100
- data/doc/rdoc/core/classes/FileTest.html +8 -8
- data/doc/rdoc/core/classes/Float.html +32 -32
- data/doc/rdoc/core/classes/Friend.html +8 -8
- data/doc/rdoc/core/classes/Functor.html +12 -12
- data/doc/rdoc/core/classes/Hash.html +439 -847
- data/doc/rdoc/{more → core}/classes/Indexable.html +115 -115
- data/doc/rdoc/core/classes/InstanceVariables.html +88 -88
- data/doc/rdoc/core/classes/Integer.html +142 -142
- data/doc/rdoc/core/classes/Kernel.html +602 -600
- data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
- data/doc/rdoc/core/classes/MatchData.html +30 -30
- data/doc/rdoc/core/classes/Module.html +379 -327
- data/doc/rdoc/core/classes/NilClass.html +32 -32
- data/doc/rdoc/core/classes/Numeric.html +46 -46
- data/doc/rdoc/core/classes/Object.html +4 -4
- data/doc/rdoc/core/classes/Proc.html +46 -134
- data/doc/rdoc/core/classes/Range.html +60 -60
- data/doc/rdoc/core/classes/Regexp.html +28 -28
- data/doc/rdoc/{more → core}/classes/Stackable.html +38 -38
- data/doc/rdoc/core/classes/String.html +844 -504
- data/doc/rdoc/core/classes/Symbol.html +62 -62
- data/doc/rdoc/core/classes/Time.html +112 -112
- data/doc/rdoc/core/classes/TrueClass.html +8 -8
- data/doc/rdoc/core/classes/UnboundMethod.html +22 -22
- data/doc/rdoc/core/created.rid +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array_rb.html +4 -1
- data/doc/rdoc/core/files/lib/core/facets/binding_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/boolean_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/class/methodize_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/class/pathize_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/class_rb.html +5 -1
- data/doc/rdoc/core/files/lib/core/facets/dir_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/{class/to_methodname_rb.html → enumerable/commonality_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/enumerable/entropy_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/{class/to_pathname_rb.html → enumerable/frequency_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/enumerable/probability_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable_rb.html +6 -2
- data/doc/rdoc/core/files/lib/core/facets/file_rb.html +2 -1
- data/doc/rdoc/core/files/lib/core/facets/hash_rb.html +7 -1
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/indexable_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/kernel/require_all_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel/require_local_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel_rb.html +15 -2
- data/doc/rdoc/core/files/lib/core/facets/module/integrate_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/module/methodize_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/module/module_load_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/pathize_rb.html +5 -1
- data/doc/rdoc/core/files/lib/core/facets/module/redefine_method_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/module/redirect_method_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/module/rename_method_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/module/revise_rb.html +8 -1
- data/doc/rdoc/core/files/lib/core/facets/module/wrap_method_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/module_rb.html +8 -5
- data/doc/rdoc/core/files/lib/core/facets/numeric_rb.html +2 -1
- data/doc/rdoc/core/files/lib/core/facets/proc_rb.html +3 -5
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/stackable_rb.html +3 -4
- data/doc/rdoc/core/files/lib/core/facets/string/each_word_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/{module/clone_rb.html → string/methodize_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/{kernel/load_rb.html → string/pathize_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/string/word_wrap_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/words_rb.html +1 -5
- data/doc/rdoc/core/files/lib/core/facets/string_rb.html +8 -3
- data/doc/rdoc/core/files/lib/core/facets/symbol_rb.html +2 -1
- data/doc/rdoc/core/fr_class_index.html +2 -3
- data/doc/rdoc/core/fr_file_index.html +36 -16
- data/doc/rdoc/core/fr_method_index.html +778 -784
- data/doc/rdoc/lore/created.rid +1 -1
- data/doc/rdoc/more/classes/ANSICode.html +66 -66
- data/doc/rdoc/more/classes/Advisable.html +37 -37
- data/doc/rdoc/more/classes/Advisable/Method.html +20 -20
- data/doc/rdoc/more/classes/Archive/Tar/Minitar.html +27 -27
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Input.html +28 -28
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Output.html +19 -19
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Reader.html +31 -31
- data/doc/rdoc/more/classes/Archive/Tar/Minitar/Writer.html +33 -33
- data/doc/rdoc/more/classes/Association.html +28 -28
- data/doc/rdoc/more/classes/Association/Kernel.html +8 -8
- data/doc/rdoc/more/classes/Autoarray.html +12 -12
- data/doc/rdoc/more/classes/BBCode.html +34 -34
- data/doc/rdoc/more/classes/BaseX.html +16 -16
- data/doc/rdoc/more/classes/BiCrypt.html +67 -67
- data/doc/rdoc/more/classes/BigDuration.html +30 -30
- data/doc/rdoc/more/classes/BinReadable.html +85 -85
- data/doc/rdoc/more/classes/BinReadable/ByteOrder.html +25 -25
- data/doc/rdoc/more/classes/Binding.html +201 -0
- data/doc/rdoc/more/classes/Buildable.html +4 -4
- data/doc/rdoc/more/classes/BuildingBlock.html +32 -32
- data/doc/rdoc/more/classes/CLI.html +108 -0
- data/doc/rdoc/more/classes/CLI/Arguments.html +76 -76
- data/doc/rdoc/more/classes/CLI/Command.html +22 -22
- data/doc/rdoc/more/classes/CLI/NoCommandError.html +4 -4
- data/doc/rdoc/more/classes/CLI/NoOptionError.html +4 -4
- data/doc/rdoc/more/classes/CacheDecorator.html +21 -21
- data/doc/rdoc/more/classes/Capsule.html +41 -41
- data/doc/rdoc/more/classes/Chain.html +17 -17
- data/doc/rdoc/more/classes/Cloneable.html +4 -4
- data/doc/rdoc/more/classes/ConsoleUtils.html +18 -18
- data/doc/rdoc/more/classes/Coroutine.html +28 -28
- data/doc/rdoc/more/classes/Crypt.html +16 -16
- data/doc/rdoc/more/classes/CssFilter.html +45 -45
- data/doc/rdoc/more/classes/CssTree.html +8 -8
- data/doc/rdoc/more/classes/Dictionary.html +228 -228
- data/doc/rdoc/more/classes/DictionaryMatcher.html +38 -38
- data/doc/rdoc/more/classes/DictionaryMatcher/MatchData.html +4 -4
- data/doc/rdoc/more/classes/Downloader.html +56 -56
- data/doc/rdoc/more/classes/Duration.html +68 -68
- data/doc/rdoc/more/classes/Enumerable.html +44 -44
- data/doc/rdoc/more/classes/Enumerable/Elementor.html +16 -16
- data/doc/rdoc/more/classes/Enumerable/Enumerator.html +4 -4
- data/doc/rdoc/more/classes/EnumerablePass.html +15 -15
- data/doc/rdoc/more/classes/Equatable.html +16 -16
- data/doc/rdoc/more/classes/EventHook.html +8 -8
- data/doc/rdoc/more/classes/Expirable.html +17 -17
- data/doc/rdoc/more/classes/FileList.html +125 -125
- data/doc/rdoc/more/classes/FileShell.html +147 -147
- data/doc/rdoc/more/classes/Fileable.html +14 -14
- data/doc/rdoc/more/classes/Fileable/DSL.html +41 -41
- data/doc/rdoc/more/classes/Hash.html +306 -14
- data/doc/rdoc/more/classes/Hash2Xml.html +4 -4
- data/doc/rdoc/more/classes/HtmlFilter.html +9 -9
- data/doc/rdoc/more/classes/IORedirect.html +19 -19
- data/doc/rdoc/more/classes/InfinityClass.html +36 -36
- data/doc/rdoc/more/classes/InfinityClass/Numeric.html +23 -23
- data/doc/rdoc/more/classes/Ini.html +37 -37
- data/doc/rdoc/more/classes/Instantiable.html +9 -9
- data/doc/rdoc/more/classes/Instantise.html +8 -8
- data/doc/rdoc/more/classes/Interval.html +187 -187
- data/doc/rdoc/more/classes/It.html +12 -12
- data/doc/rdoc/more/classes/Kernel.html +77 -77
- data/doc/rdoc/more/classes/LRUCache.html +38 -38
- data/doc/rdoc/more/classes/LinkedList.html +68 -68
- data/doc/rdoc/more/classes/LinkedList/Node.html +4 -4
- data/doc/rdoc/{core → more}/classes/MissingArgument.html +1 -2
- data/doc/rdoc/more/classes/Module.html +171 -171
- data/doc/rdoc/more/classes/Multiton.html +12 -12
- data/doc/rdoc/more/classes/Multiton/MetaMethods.html +28 -28
- data/doc/rdoc/more/classes/Net/SMTP.html +19 -19
- data/doc/rdoc/more/classes/NullClass.html +24 -24
- data/doc/rdoc/more/classes/ObjectReflection.html +12 -12
- data/doc/rdoc/more/classes/OpEsc.html +5 -5
- data/doc/rdoc/more/classes/OpenCascade.html +4 -4
- data/doc/rdoc/more/classes/OpenCollection.html +8 -8
- data/doc/rdoc/more/classes/OpenHash.html +9 -9
- data/doc/rdoc/more/classes/OpenObject.html +95 -95
- data/doc/rdoc/more/classes/PQueue.html +84 -84
- data/doc/rdoc/more/classes/Paramix.html +11 -11
- data/doc/rdoc/more/classes/Paramix/Delegator.html +16 -16
- data/doc/rdoc/more/classes/PathList.html +8 -8
- data/doc/rdoc/more/classes/PathList/Finder.html +8 -8
- data/doc/rdoc/more/classes/Platform.html +46 -46
- data/doc/rdoc/more/classes/Pool.html +18 -18
- data/doc/rdoc/more/classes/Proc.html +48 -4
- data/doc/rdoc/more/classes/ProgressBar.html +52 -52
- data/doc/rdoc/more/classes/Prototype.html +28 -28
- data/doc/rdoc/more/classes/RWDelegator.html +16 -16
- data/doc/rdoc/more/classes/Random.html +9 -9
- data/doc/rdoc/more/classes/Random/Array.html +37 -37
- data/doc/rdoc/more/classes/Random/Hash.html +52 -52
- data/doc/rdoc/more/classes/Random/Object.html +4 -4
- data/doc/rdoc/more/classes/Random/String.html +34 -34
- data/doc/rdoc/more/classes/Random/String/Self.html +9 -9
- data/doc/rdoc/more/classes/Recorder.html +16 -16
- data/doc/rdoc/more/classes/Reference.html +19 -19
- data/doc/rdoc/more/classes/Registerable.html +13 -13
- data/doc/rdoc/more/classes/Semaphore.html +36 -36
- data/doc/rdoc/more/classes/Settings.html +28 -28
- data/doc/rdoc/more/classes/Settings/Setting.html +13 -13
- data/doc/rdoc/more/classes/Settings/SettingCollection.html +4 -4
- data/doc/rdoc/more/classes/SimpleStringIO.html +8 -8
- data/doc/rdoc/more/classes/Snapshot.html +16 -16
- data/doc/rdoc/more/classes/Snapshot/ValueHolder.html +12 -12
- data/doc/rdoc/more/classes/String/Style.html +113 -113
- data/doc/rdoc/{core → more}/classes/String/Words.html +78 -78
- data/doc/rdoc/more/classes/Struct.html +8 -8
- data/doc/rdoc/more/classes/SyncArray.html +4 -4
- data/doc/rdoc/more/classes/SyncHash.html +4 -4
- data/doc/rdoc/more/classes/SyncHash/Delegator.html +28 -28
- data/doc/rdoc/more/classes/SyncHash/Inheritor.html +28 -28
- data/doc/rdoc/more/classes/System.html +253 -253
- data/doc/rdoc/more/classes/Timer.html +48 -48
- data/doc/rdoc/more/classes/Timer/Dummy.html +9 -9
- data/doc/rdoc/more/classes/TracePoint.html +64 -62
- data/doc/rdoc/more/classes/Tuple.html +170 -170
- data/doc/rdoc/more/classes/TypeCast/Class.html +4 -4
- data/doc/rdoc/more/classes/TypeCast/Object.html +4 -4
- data/doc/rdoc/more/classes/Uninheritable.html +6 -6
- data/doc/rdoc/more/classes/UploadUtils.html +49 -49
- data/doc/rdoc/more/classes/VersionNumber.html +53 -53
- data/doc/rdoc/more/classes/Weekdays.html +28 -28
- data/doc/rdoc/more/classes/XOXO.html +9 -9
- data/doc/rdoc/more/classes/ZipUtils.html +58 -58
- data/doc/rdoc/more/classes/ZipUtils/DryRun.html +28 -28
- data/doc/rdoc/more/classes/ZipUtils/NoWrite.html +28 -28
- data/doc/rdoc/more/classes/ZipUtils/Verbose.html +28 -28
- data/doc/rdoc/more/created.rid +1 -1
- data/doc/rdoc/more/files/lib/more/facets/ansicode_rb.html +1 -1
- data/doc/rdoc/{core/files/lib/core → more/files/lib/more}/facets/binding/opvars_rb.html +2 -2
- data/doc/rdoc/{core/files/lib/core → more/files/lib/more}/facets/hash/stringify_keys_rb.html +2 -2
- data/doc/rdoc/{core/files/lib/core → more/files/lib/more}/facets/hash/symbolize_keys_rb.html +2 -2
- data/doc/rdoc/{core/files/lib/core/facets/proc → more/files/lib/more/facets}/partial_rb.html +8 -7
- data/doc/rdoc/more/files/lib/more/facets/snapshot_rb.html +2 -2
- data/doc/rdoc/more/files/lib/more/facets/string/words_rb.html +96 -0
- data/doc/rdoc/more/files/lib/more/facets/tracepoint_rb.html +13 -8
- data/doc/rdoc/more/fr_class_index.html +4 -2
- data/doc/rdoc/more/fr_file_index.html +9 -2
- data/doc/rdoc/more/fr_method_index.html +1013 -1009
- data/doc/ri/CLI/cdesc-CLI.yaml +7 -2
- data/doc/ri/Enumerable/probability-i.yaml +1 -1
- data/doc/ri/Module/append_features-i.yaml +4 -3
- data/doc/ri/Module/cdesc-Module.yaml +4 -3
- data/doc/ri/Module/methodize-i.yaml +14 -0
- data/doc/ri/Module/redefine_method-i.yaml +1 -1
- data/doc/ri/Module/redirect_method-i.yaml +3 -1
- data/doc/ri/Module/rename_method-i.yaml +1 -1
- data/doc/ri/created.rid +1 -1
- data/lib/core/facets/array.rb +3 -0
- data/lib/core/facets/binding.rb +0 -1
- data/lib/core/facets/class.rb +4 -4
- data/lib/core/facets/class/{to_methodname.rb → methodize.rb} +5 -2
- data/lib/core/facets/class/pathize.rb +14 -0
- data/lib/core/facets/enumerable.rb +5 -2
- data/lib/core/facets/enumerable/commonality.rb +33 -0
- data/lib/core/facets/enumerable/entropy.rb +37 -0
- data/lib/core/facets/enumerable/frequency.rb +18 -0
- data/lib/core/facets/enumerable/probability.rb +1 -98
- data/lib/core/facets/file.rb +1 -1
- data/lib/core/facets/hash.rb +6 -0
- data/lib/{more → core}/facets/indexable.rb +0 -0
- data/lib/core/facets/kernel.rb +15 -1
- data/lib/core/facets/kernel/require_all.rb +21 -0
- data/lib/core/facets/kernel/{load.rb → require_local.rb} +6 -23
- data/lib/core/facets/module.rb +7 -3
- data/lib/core/facets/module/integrate.rb +2 -0
- data/lib/core/facets/module/methodize.rb +14 -0
- data/lib/core/facets/module/pathize.rb +10 -7
- data/lib/core/facets/module/redefine_method.rb +35 -0
- data/lib/core/facets/module/redirect_method.rb +45 -0
- data/lib/core/facets/module/rename_method.rb +20 -0
- data/lib/core/facets/module/revise.rb +7 -113
- data/lib/core/facets/module/wrap_method.rb +28 -0
- data/lib/core/facets/numeric.rb +1 -1
- data/lib/core/facets/proc.rb +2 -3
- data/lib/{more → core}/facets/stackable.rb +0 -0
- data/lib/core/facets/string.rb +8 -6
- data/lib/core/facets/string/each_word.rb +13 -0
- data/lib/core/facets/string/methodize.rb +12 -0
- data/lib/core/facets/string/pathize.rb +12 -0
- data/lib/core/facets/string/word_wrap.rb +34 -0
- data/lib/core/facets/string/words.rb +6 -167
- data/lib/core/facets/symbol.rb +1 -0
- data/lib/more/facets/ansicode.rb +4 -4
- data/lib/{core → more}/facets/binding/opvars.rb +0 -0
- data/lib/{core → more}/facets/hash/stringify_keys.rb +0 -0
- data/lib/{core → more}/facets/hash/symbolize_keys.rb +5 -6
- data/lib/{core/facets/proc → more/facets}/partial.rb +0 -0
- data/lib/more/facets/string/words.rb +173 -0
- data/test/core/dir/test_multiglob.rb +1 -0
- data/test/core/dir/test_recurse.rb +1 -0
- data/test/core/enumerable/test_commonality.rb +15 -0
- data/test/core/enumerable/test_entropy.rb +15 -0
- data/test/core/enumerable/test_frequency.rb +11 -0
- data/test/core/enumerable/test_probability.rb +1 -34
- data/test/core/string/test_each_word.rb +14 -0
- data/test/core/string/test_fold.rb +1 -1
- data/test/core/string/test_word_wrap.rb +35 -0
- data/test/core/string/test_words.rb +12 -61
- data/test/more/test_command.rb +7 -9
- data/test/more/test_paramix.rb +4 -1
- data/test/{core/proc → more}/test_partial.rb +1 -1
- metadata +75 -38
- data/doc/rdoc/core/classes/Module/CloneExtensions.html +0 -287
- data/doc/ri/Module/CloneExtensions/cdesc-CloneExtensions.yaml +0 -20
- data/doc/ri/Module/CloneExtensions/clone_removing-i.yaml +0 -14
- data/doc/ri/Module/CloneExtensions/clone_renaming-i.yaml +0 -14
- data/doc/ri/Module/CloneExtensions/clone_using-i.yaml +0 -14
- data/lib/core/facets/class/to_pathname.rb +0 -12
- data/lib/core/facets/module/clone.rb +0 -57
- data/test/core/module/test_clone.rb +0 -45
@@ -90,9 +90,9 @@ NOTE: This is an expiremental library, and is still
|
|
90
90
|
|
91
91
|
<div class="sectiontitle">Methods</div>
|
92
92
|
<ul>
|
93
|
-
<li><a href="#
|
94
|
-
<li><a href="#
|
95
|
-
<li><a href="#
|
93
|
+
<li><a href="#M000664">included</a></li>
|
94
|
+
<li><a href="#M000665">new</a></li>
|
95
|
+
<li><a href="#M000666">read</a></li>
|
96
96
|
</ul>
|
97
97
|
|
98
98
|
|
@@ -106,17 +106,17 @@ NOTE: This is an expiremental library, and is still
|
|
106
106
|
<div class="sectiontitle">Public Class methods</div>
|
107
107
|
<div class="method">
|
108
108
|
<div class="title">
|
109
|
-
<a name="
|
109
|
+
<a name="M000664"></a><b>included</b>(base)
|
110
110
|
</div>
|
111
111
|
<div class="description">
|
112
112
|
<p>
|
113
|
-
When <a href="Fileable.html#
|
113
|
+
When <a href="Fileable.html#M000664">included</a> extend <a
|
114
114
|
href="Fileable/DSL.html">DSL</a> too.
|
115
115
|
</p>
|
116
116
|
</div>
|
117
117
|
<div class="sourcecode">
|
118
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
119
|
-
<div id="
|
118
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000664_source')" id="l_M000664_source">show source</a> ]</p>
|
119
|
+
<div id="M000664_source" class="dyn-source">
|
120
120
|
<pre>
|
121
121
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 50</span>
|
122
122
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
|
@@ -128,18 +128,18 @@ href="Fileable/DSL.html">DSL</a> too.
|
|
128
128
|
</div>
|
129
129
|
<div class="method">
|
130
130
|
<div class="title">
|
131
|
-
<a name="
|
131
|
+
<a name="M000665"></a><b>new</b>(content)
|
132
132
|
</div>
|
133
133
|
<div class="description">
|
134
134
|
<p>
|
135
135
|
New fileable object. By default this is called by <a
|
136
|
-
href="Fileable.html#
|
136
|
+
href="Fileable.html#M000666">read</a> passing the file contents. Override
|
137
137
|
it if need is differnt.
|
138
138
|
</p>
|
139
139
|
</div>
|
140
140
|
<div class="sourcecode">
|
141
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
142
|
-
<div id="
|
141
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000665_source')" id="l_M000665_source">show source</a> ]</p>
|
142
|
+
<div id="M000665_source" class="dyn-source">
|
143
143
|
<pre>
|
144
144
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 62</span>
|
145
145
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">content</span>)
|
@@ -152,7 +152,7 @@ it if need is differnt.
|
|
152
152
|
<div class="sectiontitle">Public Instance methods</div>
|
153
153
|
<div class="method">
|
154
154
|
<div class="title">
|
155
|
-
<a name="
|
155
|
+
<a name="M000666"></a><b>read</b>(file)
|
156
156
|
</div>
|
157
157
|
<div class="description">
|
158
158
|
<p>
|
@@ -160,8 +160,8 @@ Override this if reading is differnt.
|
|
160
160
|
</p>
|
161
161
|
</div>
|
162
162
|
<div class="sourcecode">
|
163
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
164
|
-
<div id="
|
163
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000666_source')" id="l_M000666_source">show source</a> ]</p>
|
164
|
+
<div id="M000666_source" class="dyn-source">
|
165
165
|
<pre>
|
166
166
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 68</span>
|
167
167
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">read</span>(<span class="ruby-identifier">file</span>)
|
@@ -74,14 +74,14 @@
|
|
74
74
|
|
75
75
|
<div class="sectiontitle">Methods</div>
|
76
76
|
<ul>
|
77
|
-
<li><a href="#
|
78
|
-
<li><a href="#
|
79
|
-
<li><a href="#
|
80
|
-
<li><a href="#
|
81
|
-
<li><a href="#
|
82
|
-
<li><a href="#
|
83
|
-
<li><a href="#
|
84
|
-
<li><a href="#
|
77
|
+
<li><a href="#M000673">file</a></li>
|
78
|
+
<li><a href="#M000668">filename</a></li>
|
79
|
+
<li><a href="#M000667">included</a></li>
|
80
|
+
<li><a href="#M000670">load</a></li>
|
81
|
+
<li><a href="#M000674">load_cache</a></li>
|
82
|
+
<li><a href="#M000672">locate</a></li>
|
83
|
+
<li><a href="#M000671">lookup</a></li>
|
84
|
+
<li><a href="#M000669">open</a></li>
|
85
85
|
</ul>
|
86
86
|
|
87
87
|
|
@@ -92,18 +92,18 @@
|
|
92
92
|
<div class="sectiontitle">Public Instance methods</div>
|
93
93
|
<div class="method">
|
94
94
|
<div class="title">
|
95
|
-
<a name="
|
95
|
+
<a name="M000673"></a><b>file</b>(path=nil)
|
96
96
|
</div>
|
97
97
|
<div class="description">
|
98
98
|
<p>
|
99
|
-
Find <a href="DSL.html#
|
99
|
+
Find <a href="DSL.html#M000673">file</a>. The <tt>path</tt> has to be
|
100
100
|
either the exact path or the directory where a standard-named <a
|
101
|
-
href="DSL.html#
|
101
|
+
href="DSL.html#M000673">file</a> resides.
|
102
102
|
</p>
|
103
103
|
</div>
|
104
104
|
<div class="sourcecode">
|
105
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
106
|
-
<div id="
|
105
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000673_source')" id="l_M000673_source">show source</a> ]</p>
|
106
|
+
<div id="M000673_source" class="dyn-source">
|
107
107
|
<pre>
|
108
108
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 140</span>
|
109
109
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file</span>(<span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -126,17 +126,17 @@ href="DSL.html#M000645">file</a> resides.
|
|
126
126
|
</div>
|
127
127
|
<div class="method">
|
128
128
|
<div class="title">
|
129
|
-
<a name="
|
129
|
+
<a name="M000668"></a><b>filename</b>()
|
130
130
|
</div>
|
131
131
|
<div class="description">
|
132
132
|
<p>
|
133
133
|
Override this with the name or name-glob of the default <a
|
134
|
-
href="DSL.html#
|
134
|
+
href="DSL.html#M000673">file</a>. If no default, return nil.
|
135
135
|
</p>
|
136
136
|
</div>
|
137
137
|
<div class="sourcecode">
|
138
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
139
|
-
<div id="
|
138
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000668_source')" id="l_M000668_source">show source</a> ]</p>
|
139
|
+
<div id="M000668_source" class="dyn-source">
|
140
140
|
<pre>
|
141
141
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 86</span>
|
142
142
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filename</span>; <span class="ruby-keyword kw">nil</span>; <span class="ruby-keyword kw">end</span>
|
@@ -146,7 +146,7 @@ href="DSL.html#M000645">file</a>. If no default, return nil.
|
|
146
146
|
</div>
|
147
147
|
<div class="method">
|
148
148
|
<div class="title">
|
149
|
-
<a name="
|
149
|
+
<a name="M000667"></a><b>included</b>(base)
|
150
150
|
</div>
|
151
151
|
<div class="description">
|
152
152
|
<p>
|
@@ -155,8 +155,8 @@ the <a href="DSL.html">DSL</a> inheritance going.
|
|
155
155
|
</p>
|
156
156
|
</div>
|
157
157
|
<div class="sourcecode">
|
158
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
159
|
-
<div id="
|
158
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000667_source')" id="l_M000667_source">show source</a> ]</p>
|
159
|
+
<div id="M000667_source" class="dyn-source">
|
160
160
|
<pre>
|
161
161
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 79</span>
|
162
162
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
|
@@ -168,19 +168,19 @@ the <a href="DSL.html">DSL</a> inheritance going.
|
|
168
168
|
</div>
|
169
169
|
<div class="method">
|
170
170
|
<div class="title">
|
171
|
-
<a name="
|
171
|
+
<a name="M000670"></a><b>load</b>(path_or_data)
|
172
172
|
</div>
|
173
173
|
<div class="description">
|
174
174
|
<p>
|
175
175
|
An initializer that can take either a File, Pathname or raw data. This
|
176
176
|
works much like YAML::load does. Unlike <tt><a
|
177
|
-
href="DSL.html#
|
178
|
-
href="DSL.html#
|
177
|
+
href="DSL.html#M000669">open</a></tt>, <tt><a
|
178
|
+
href="DSL.html#M000670">load</a></tt> requires an exact path parameter.
|
179
179
|
</p>
|
180
180
|
</div>
|
181
181
|
<div class="sourcecode">
|
182
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
183
|
-
<div id="
|
182
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000670_source')" id="l_M000670_source">show source</a> ]</p>
|
183
|
+
<div id="M000670_source" class="dyn-source">
|
184
184
|
<pre>
|
185
185
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 103</span>
|
186
186
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">path_or_data</span>)
|
@@ -199,17 +199,17 @@ href="DSL.html#M000642">load</a></tt> requires an exact path parameter.
|
|
199
199
|
</div>
|
200
200
|
<div class="method">
|
201
201
|
<div class="title">
|
202
|
-
<a name="
|
202
|
+
<a name="M000674"></a><b>load_cache</b>()
|
203
203
|
</div>
|
204
204
|
<div class="description">
|
205
205
|
<p>
|
206
206
|
Load cache. PackageInfo is multiton when loaded by <a
|
207
|
-
href="DSL.html#
|
207
|
+
href="DSL.html#M000673">file</a>.
|
208
208
|
</p>
|
209
209
|
</div>
|
210
210
|
<div class="sourcecode">
|
211
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
212
|
-
<div id="
|
211
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000674_source')" id="l_M000674_source">show source</a> ]</p>
|
212
|
+
<div id="M000674_source" class="dyn-source">
|
213
213
|
<pre>
|
214
214
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 157</span>
|
215
215
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_cache</span>
|
@@ -221,16 +221,16 @@ href="DSL.html#M000645">file</a>.
|
|
221
221
|
</div>
|
222
222
|
<div class="method">
|
223
223
|
<div class="title">
|
224
|
-
<a name="
|
224
|
+
<a name="M000672"></a><b>locate</b>(name=nil)
|
225
225
|
</div>
|
226
226
|
<div class="description">
|
227
227
|
<p>
|
228
|
-
Locate <a href="DSL.html#
|
228
|
+
Locate <a href="DSL.html#M000673">file</a> (case insensitive).
|
229
229
|
</p>
|
230
230
|
</div>
|
231
231
|
<div class="sourcecode">
|
232
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
233
|
-
<div id="
|
232
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000672_source')" id="l_M000672_source">show source</a> ]</p>
|
233
|
+
<div id="M000672_source" class="dyn-source">
|
234
234
|
<pre>
|
235
235
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 123</span>
|
236
236
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">locate</span>(<span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -251,16 +251,16 @@ Locate <a href="DSL.html#M000645">file</a> (case insensitive).
|
|
251
251
|
</div>
|
252
252
|
<div class="method">
|
253
253
|
<div class="title">
|
254
|
-
<a name="
|
254
|
+
<a name="M000671"></a><b>lookup</b>(name=nil)
|
255
255
|
</div>
|
256
256
|
<div class="description">
|
257
257
|
<p>
|
258
|
-
Lookup <a href="DSL.html#
|
258
|
+
Lookup <a href="DSL.html#M000673">file</a>.
|
259
259
|
</p>
|
260
260
|
</div>
|
261
261
|
<div class="sourcecode">
|
262
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
263
|
-
<div id="
|
262
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000671_source')" id="l_M000671_source">show source</a> ]</p>
|
263
|
+
<div id="M000671_source" class="dyn-source">
|
264
264
|
<pre>
|
265
265
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 116</span>
|
266
266
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -273,16 +273,16 @@ Lookup <a href="DSL.html#M000645">file</a>.
|
|
273
273
|
</div>
|
274
274
|
<div class="method">
|
275
275
|
<div class="title">
|
276
|
-
<a name="
|
276
|
+
<a name="M000669"></a><b>open</b>(path=nil)
|
277
277
|
</div>
|
278
278
|
<div class="description">
|
279
279
|
<p>
|
280
|
-
Load from <a href="DSL.html#
|
280
|
+
Load from <a href="DSL.html#M000673">file</a>(s).
|
281
281
|
</p>
|
282
282
|
</div>
|
283
283
|
<div class="sourcecode">
|
284
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
285
|
-
<div id="
|
284
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000669_source')" id="l_M000669_source">show source</a> ]</p>
|
285
|
+
<div id="M000669_source" class="dyn-source">
|
286
286
|
<pre>
|
287
287
|
<span class="ruby-comment cmt"># File lib/more/facets/fileable.rb, line 90</span>
|
288
288
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-identifier">path</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -57,6 +57,8 @@
|
|
57
57
|
<tr valign="top">
|
58
58
|
<td>In:</td>
|
59
59
|
<td>
|
60
|
+
<a href="../files/lib/more/facets/hash/symbolize_keys_rb.html">lib/more/facets/hash/symbolize_keys.rb</a>
|
61
|
+
<a href="../files/lib/more/facets/hash/symbolize_keys_rb.html">lib/more/facets/hash/symbolize_keys.rb</a>
|
60
62
|
<a href="../files/lib/more/facets/xmlhash_rb.html">lib/more/facets/xmlhash.rb</a>
|
61
63
|
<a href="../files/lib/more/facets/snapshot_rb.html">lib/more/facets/snapshot.rb</a>
|
62
64
|
<a href="../files/lib/more/facets/openobject_rb.html">lib/more/facets/openobject.rb</a>
|
@@ -83,10 +85,18 @@ Object
|
|
83
85
|
|
84
86
|
<div class="sectiontitle">Methods</div>
|
85
87
|
<ul>
|
86
|
-
<li><a href="#
|
87
|
-
<li><a href="#
|
88
|
-
<li><a href="#M000272">
|
89
|
-
<li><a href="#
|
88
|
+
<li><a href="#M000280">restore_snapshot</a></li>
|
89
|
+
<li><a href="#M000276">stringify_keys</a></li>
|
90
|
+
<li><a href="#M000272">stringify_keys</a></li>
|
91
|
+
<li><a href="#M000273">stringify_keys!</a></li>
|
92
|
+
<li><a href="#M000277">stringify_keys!</a></li>
|
93
|
+
<li><a href="#M000270">symbolize_keys</a></li>
|
94
|
+
<li><a href="#M000274">symbolize_keys</a></li>
|
95
|
+
<li><a href="#M000275">symbolize_keys!</a></li>
|
96
|
+
<li><a href="#M000271">symbolize_keys!</a></li>
|
97
|
+
<li><a href="#M000279">take_snapshot</a></li>
|
98
|
+
<li><a href="#M000281">to_openobject</a></li>
|
99
|
+
<li><a href="#M000278">to_xml</a></li>
|
90
100
|
</ul>
|
91
101
|
|
92
102
|
<div class="sectiontitle">Included Modules</div>
|
@@ -101,11 +111,11 @@ Object
|
|
101
111
|
<div class="sectiontitle">Public Instance methods</div>
|
102
112
|
<div class="method">
|
103
113
|
<div class="title">
|
104
|
-
<a name="
|
114
|
+
<a name="M000280"></a><b>restore_snapshot</b>(snap)
|
105
115
|
</div>
|
106
116
|
<div class="sourcecode">
|
107
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
108
|
-
<div id="
|
117
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000280_source')" id="l_M000280_source">show source</a> ]</p>
|
118
|
+
<div id="M000280_source" class="dyn-source">
|
109
119
|
<pre>
|
110
120
|
<span class="ruby-comment cmt"># File lib/more/facets/snapshot.rb, line 195</span>
|
111
121
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>) <span class="ruby-identifier">replace</span>(<span class="ruby-identifier">snap</span>) <span class="ruby-keyword kw">end</span>
|
@@ -115,12 +125,294 @@ Object
|
|
115
125
|
</div>
|
116
126
|
<div class="method">
|
117
127
|
<div class="title">
|
118
|
-
<a name="
|
128
|
+
<a name="M000276"></a><b>stringify_keys</b>(&filter)
|
129
|
+
</div>
|
130
|
+
<div class="description">
|
131
|
+
<p>
|
132
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Strings, returning
|
133
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt> parameter,
|
134
|
+
limits conversion to only a certain selection of keys.
|
135
|
+
</p>
|
136
|
+
<pre>
|
137
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
138
|
+
foo.stringify_keys #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
139
|
+
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
140
|
+
</pre>
|
141
|
+
<p>
|
142
|
+
This method is considered archaic. Use rekey instead.
|
143
|
+
</p>
|
144
|
+
</div>
|
145
|
+
<div class="sourcecode">
|
146
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000276_source')" id="l_M000276_source">show source</a> ]</p>
|
147
|
+
<div id="M000276_source" class="dyn-source">
|
148
|
+
<pre>
|
149
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 59</span>
|
150
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
151
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
152
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
153
|
+
<span class="ruby-keyword kw">else</span>
|
154
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
155
|
+
<span class="ruby-keyword kw">end</span>
|
156
|
+
<span class="ruby-keyword kw">end</span>
|
157
|
+
</pre>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
<div class="method">
|
162
|
+
<div class="title">
|
163
|
+
<a name="M000272"></a><b>stringify_keys</b>(&filter)
|
164
|
+
</div>
|
165
|
+
<div class="description">
|
166
|
+
<p>
|
167
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Strings, returning
|
168
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt> parameter,
|
169
|
+
limits conversion to only a certain selection of keys.
|
170
|
+
</p>
|
171
|
+
<pre>
|
172
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
173
|
+
foo.stringify_keys #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
174
|
+
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
175
|
+
</pre>
|
176
|
+
<p>
|
177
|
+
This method is considered archaic. Use rekey instead.
|
178
|
+
</p>
|
179
|
+
</div>
|
180
|
+
<div class="sourcecode">
|
181
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000272_source')" id="l_M000272_source">show source</a> ]</p>
|
182
|
+
<div id="M000272_source" class="dyn-source">
|
183
|
+
<pre>
|
184
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 59</span>
|
185
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
186
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
187
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
188
|
+
<span class="ruby-keyword kw">else</span>
|
189
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
190
|
+
<span class="ruby-keyword kw">end</span>
|
191
|
+
<span class="ruby-keyword kw">end</span>
|
192
|
+
</pre>
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
<div class="method">
|
197
|
+
<div class="title">
|
198
|
+
<a name="M000273"></a><b>stringify_keys!</b>(&filter)
|
199
|
+
</div>
|
200
|
+
<div class="description">
|
201
|
+
<p>
|
202
|
+
Synonym for <a href="Hash.html#M000272">Hash#stringify_keys</a>, but
|
203
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
204
|
+
parameter, limits conversion to only a certain selection of keys.
|
205
|
+
</p>
|
206
|
+
<pre>
|
207
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
208
|
+
foo.stringify_keys! #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
209
|
+
foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
210
|
+
</pre>
|
211
|
+
<p>
|
212
|
+
This method is considered archaic. Use rekey instead.
|
213
|
+
</p>
|
214
|
+
</div>
|
215
|
+
<div class="sourcecode">
|
216
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000273_source')" id="l_M000273_source">show source</a> ]</p>
|
217
|
+
<div id="M000273_source" class="dyn-source">
|
218
|
+
<pre>
|
219
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 78</span>
|
220
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
221
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
222
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
223
|
+
<span class="ruby-keyword kw">else</span>
|
224
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
225
|
+
<span class="ruby-keyword kw">end</span>
|
226
|
+
<span class="ruby-keyword kw">end</span>
|
227
|
+
</pre>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
<div class="method">
|
232
|
+
<div class="title">
|
233
|
+
<a name="M000277"></a><b>stringify_keys!</b>(&filter)
|
234
|
+
</div>
|
235
|
+
<div class="description">
|
236
|
+
<p>
|
237
|
+
Synonym for <a href="Hash.html#M000272">Hash#stringify_keys</a>, but
|
238
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
239
|
+
parameter, limits conversion to only a certain selection of keys.
|
240
|
+
</p>
|
241
|
+
<pre>
|
242
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
243
|
+
foo.stringify_keys! #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
244
|
+
foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
245
|
+
</pre>
|
246
|
+
<p>
|
247
|
+
This method is considered archaic. Use rekey instead.
|
248
|
+
</p>
|
249
|
+
</div>
|
250
|
+
<div class="sourcecode">
|
251
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000277_source')" id="l_M000277_source">show source</a> ]</p>
|
252
|
+
<div id="M000277_source" class="dyn-source">
|
253
|
+
<pre>
|
254
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 78</span>
|
255
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
256
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
257
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
258
|
+
<span class="ruby-keyword kw">else</span>
|
259
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
260
|
+
<span class="ruby-keyword kw">end</span>
|
261
|
+
<span class="ruby-keyword kw">end</span>
|
262
|
+
</pre>
|
263
|
+
</div>
|
264
|
+
</div>
|
265
|
+
</div>
|
266
|
+
<div class="method">
|
267
|
+
<div class="title">
|
268
|
+
<a name="M000270"></a><b>symbolize_keys</b>(&filter)
|
269
|
+
</div>
|
270
|
+
<div class="description">
|
271
|
+
<p>
|
272
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Symbols, returning
|
273
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt>, limits
|
274
|
+
conversion to only a certain selection of keys.
|
275
|
+
</p>
|
276
|
+
<pre>
|
277
|
+
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
278
|
+
foo.symbolize_keys #=> { :name=>"Gavin", :wife=>:Lisa }
|
279
|
+
foo.inspect #=> { "name" =>"Gavin", "wife"=>:Lisa }
|
280
|
+
</pre>
|
281
|
+
<p>
|
282
|
+
This method is considered archaic. Use rekey instead.
|
283
|
+
</p>
|
119
284
|
</div>
|
120
285
|
<div class="sourcecode">
|
121
286
|
<p class="source-link">[ <a href="javascript:toggleSource('M000270_source')" id="l_M000270_source">show source</a> ]</p>
|
122
287
|
<div id="M000270_source" class="dyn-source">
|
123
288
|
<pre>
|
289
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 14</span>
|
290
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
291
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
292
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
293
|
+
<span class="ruby-keyword kw">else</span>
|
294
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
295
|
+
<span class="ruby-keyword kw">end</span>
|
296
|
+
<span class="ruby-keyword kw">end</span>
|
297
|
+
</pre>
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
</div>
|
301
|
+
<div class="method">
|
302
|
+
<div class="title">
|
303
|
+
<a name="M000274"></a><b>symbolize_keys</b>(&filter)
|
304
|
+
</div>
|
305
|
+
<div class="description">
|
306
|
+
<p>
|
307
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Symbols, returning
|
308
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt>, limits
|
309
|
+
conversion to only a certain selection of keys.
|
310
|
+
</p>
|
311
|
+
<pre>
|
312
|
+
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
313
|
+
foo.symbolize_keys #=> { :name=>"Gavin", :wife=>:Lisa }
|
314
|
+
foo.inspect #=> { "name" =>"Gavin", "wife"=>:Lisa }
|
315
|
+
</pre>
|
316
|
+
<p>
|
317
|
+
This method is considered archaic. Use rekey instead.
|
318
|
+
</p>
|
319
|
+
</div>
|
320
|
+
<div class="sourcecode">
|
321
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000274_source')" id="l_M000274_source">show source</a> ]</p>
|
322
|
+
<div id="M000274_source" class="dyn-source">
|
323
|
+
<pre>
|
324
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 14</span>
|
325
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
326
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
327
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
328
|
+
<span class="ruby-keyword kw">else</span>
|
329
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
330
|
+
<span class="ruby-keyword kw">end</span>
|
331
|
+
<span class="ruby-keyword kw">end</span>
|
332
|
+
</pre>
|
333
|
+
</div>
|
334
|
+
</div>
|
335
|
+
</div>
|
336
|
+
<div class="method">
|
337
|
+
<div class="title">
|
338
|
+
<a name="M000275"></a><b>symbolize_keys!</b>(&filter)
|
339
|
+
</div>
|
340
|
+
<div class="description">
|
341
|
+
<p>
|
342
|
+
Synonym for <a href="Hash.html#M000270">Hash#symbolize_keys</a>, but
|
343
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
344
|
+
parameter, limits conversion to only a certain selection of keys.
|
345
|
+
</p>
|
346
|
+
<pre>
|
347
|
+
foo = { 'name'=>'Gavin', 'wife'=>:Lisa }
|
348
|
+
foo.symbolize_keys! #=> { :name=>"Gavin", :wife=>:Lisa }
|
349
|
+
foo.inspect #=> { :name=>"Gavin", :wife=>:Lisa }
|
350
|
+
</pre>
|
351
|
+
<p>
|
352
|
+
This method is considered archaic. Use rekey instead.
|
353
|
+
</p>
|
354
|
+
</div>
|
355
|
+
<div class="sourcecode">
|
356
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000275_source')" id="l_M000275_source">show source</a> ]</p>
|
357
|
+
<div id="M000275_source" class="dyn-source">
|
358
|
+
<pre>
|
359
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 39</span>
|
360
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
361
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
362
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
363
|
+
<span class="ruby-keyword kw">else</span>
|
364
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
365
|
+
<span class="ruby-keyword kw">end</span>
|
366
|
+
|
367
|
+
<span class="ruby-keyword kw">end</span>
|
368
|
+
</pre>
|
369
|
+
</div>
|
370
|
+
</div>
|
371
|
+
</div>
|
372
|
+
<div class="method">
|
373
|
+
<div class="title">
|
374
|
+
<a name="M000271"></a><b>symbolize_keys!</b>(&filter)
|
375
|
+
</div>
|
376
|
+
<div class="description">
|
377
|
+
<p>
|
378
|
+
Synonym for <a href="Hash.html#M000270">Hash#symbolize_keys</a>, but
|
379
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
380
|
+
parameter, limits conversion to only a certain selection of keys.
|
381
|
+
</p>
|
382
|
+
<pre>
|
383
|
+
foo = { 'name'=>'Gavin', 'wife'=>:Lisa }
|
384
|
+
foo.symbolize_keys! #=> { :name=>"Gavin", :wife=>:Lisa }
|
385
|
+
foo.inspect #=> { :name=>"Gavin", :wife=>:Lisa }
|
386
|
+
</pre>
|
387
|
+
<p>
|
388
|
+
This method is considered archaic. Use rekey instead.
|
389
|
+
</p>
|
390
|
+
</div>
|
391
|
+
<div class="sourcecode">
|
392
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000271_source')" id="l_M000271_source">show source</a> ]</p>
|
393
|
+
<div id="M000271_source" class="dyn-source">
|
394
|
+
<pre>
|
395
|
+
<span class="ruby-comment cmt"># File lib/more/facets/hash/symbolize_keys.rb, line 39</span>
|
396
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
397
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
398
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
399
|
+
<span class="ruby-keyword kw">else</span>
|
400
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
401
|
+
<span class="ruby-keyword kw">end</span>
|
402
|
+
|
403
|
+
<span class="ruby-keyword kw">end</span>
|
404
|
+
</pre>
|
405
|
+
</div>
|
406
|
+
</div>
|
407
|
+
</div>
|
408
|
+
<div class="method">
|
409
|
+
<div class="title">
|
410
|
+
<a name="M000279"></a><b>take_snapshot</b>()
|
411
|
+
</div>
|
412
|
+
<div class="sourcecode">
|
413
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000279_source')" id="l_M000279_source">show source</a> ]</p>
|
414
|
+
<div id="M000279_source" class="dyn-source">
|
415
|
+
<pre>
|
124
416
|
<span class="ruby-comment cmt"># File lib/more/facets/snapshot.rb, line 194</span>
|
125
417
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>() <span class="ruby-identifier">dup</span> <span class="ruby-keyword kw">end</span>
|
126
418
|
</pre>
|
@@ -129,7 +421,7 @@ Object
|
|
129
421
|
</div>
|
130
422
|
<div class="method">
|
131
423
|
<div class="title">
|
132
|
-
<a name="
|
424
|
+
<a name="M000281"></a><b>to_openobject</b>()
|
133
425
|
</div>
|
134
426
|
<div class="description">
|
135
427
|
<p>
|
@@ -138,8 +430,8 @@ href="OpenObject.html">OpenObject</a>.
|
|
138
430
|
</p>
|
139
431
|
</div>
|
140
432
|
<div class="sourcecode">
|
141
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
142
|
-
<div id="
|
433
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000281_source')" id="l_M000281_source">show source</a> ]</p>
|
434
|
+
<div id="M000281_source" class="dyn-source">
|
143
435
|
<pre>
|
144
436
|
<span class="ruby-comment cmt"># File lib/more/facets/openobject.rb, line 236</span>
|
145
437
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_openobject</span>
|
@@ -151,11 +443,11 @@ href="OpenObject.html">OpenObject</a>.
|
|
151
443
|
</div>
|
152
444
|
<div class="method">
|
153
445
|
<div class="title">
|
154
|
-
<a name="
|
446
|
+
<a name="M000278"></a><b>to_xml</b>(root='root')
|
155
447
|
</div>
|
156
448
|
<div class="sourcecode">
|
157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
158
|
-
<div id="
|
449
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000278_source')" id="l_M000278_source">show source</a> ]</p>
|
450
|
+
<div id="M000278_source" class="dyn-source">
|
159
451
|
<pre>
|
160
452
|
<span class="ruby-comment cmt"># File lib/more/facets/xmlhash.rb, line 67</span>
|
161
453
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_xml</span>(<span class="ruby-identifier">root</span>=<span class="ruby-value str">'root'</span>)
|