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
@@ -116,11 +116,11 @@ Here is an example of usage:
|
|
116
116
|
|
117
117
|
<div class="sectiontitle">Methods</div>
|
118
118
|
<ul>
|
119
|
-
<li><a href="#
|
120
|
-
<li><a href="#
|
121
|
-
<li><a href="#
|
122
|
-
<li><a href="#
|
123
|
-
<li><a href="#
|
119
|
+
<li><a href="#M000694">call</a></li>
|
120
|
+
<li><a href="#M000693">new</a></li>
|
121
|
+
<li><a href="#M000690">option_arity</a></li>
|
122
|
+
<li><a href="#M000691">start</a></li>
|
123
|
+
<li><a href="#M000692">subcommand</a></li>
|
124
124
|
</ul>
|
125
125
|
|
126
126
|
|
@@ -159,11 +159,11 @@ the pre-options.
|
|
159
159
|
<div class="sectiontitle">Public Class methods</div>
|
160
160
|
<div class="method">
|
161
161
|
<div class="title">
|
162
|
-
<a name="
|
162
|
+
<a name="M000693"></a><b>new</b>(*args)
|
163
163
|
</div>
|
164
164
|
<div class="sourcecode">
|
165
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
166
|
-
<div id="
|
165
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000693_source')" id="l_M000693_source">show source</a> ]</p>
|
166
|
+
<div id="M000693_source" class="dyn-source">
|
167
167
|
<pre>
|
168
168
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 187</span>
|
169
169
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -181,11 +181,11 @@ the pre-options.
|
|
181
181
|
</div>
|
182
182
|
<div class="method">
|
183
183
|
<div class="title">
|
184
|
-
<a name="
|
184
|
+
<a name="M000690"></a><b>option_arity</b>(arity_hash=nil)
|
185
185
|
</div>
|
186
186
|
<div class="sourcecode">
|
187
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
188
|
-
<div id="
|
187
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000690_source')" id="l_M000690_source">show source</a> ]</p>
|
188
|
+
<div id="M000690_source" class="dyn-source">
|
189
189
|
<pre>
|
190
190
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 126</span>
|
191
191
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">option_arity</span>(<span class="ruby-identifier">arity_hash</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -200,11 +200,11 @@ the pre-options.
|
|
200
200
|
</div>
|
201
201
|
<div class="method">
|
202
202
|
<div class="title">
|
203
|
-
<a name="
|
203
|
+
<a name="M000691"></a><b>start</b>(line=nil)
|
204
204
|
</div>
|
205
205
|
<div class="sourcecode">
|
206
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
207
|
-
<div id="
|
206
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000691_source')" id="l_M000691_source">show source</a> ]</p>
|
207
|
+
<div id="M000691_source" class="dyn-source">
|
208
208
|
<pre>
|
209
209
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 135</span>
|
210
210
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">line</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -229,7 +229,7 @@ the pre-options.
|
|
229
229
|
</div>
|
230
230
|
<div class="method">
|
231
231
|
<div class="title">
|
232
|
-
<a name="
|
232
|
+
<a name="M000692"></a><b>subcommand</b>(name, command_class, options=nil)
|
233
233
|
</div>
|
234
234
|
<div class="description">
|
235
235
|
<p>
|
@@ -237,8 +237,8 @@ For dispatchers, this is a convenience method for creating subcommands.
|
|
237
237
|
</p>
|
238
238
|
</div>
|
239
239
|
<div class="sourcecode">
|
240
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
241
|
-
<div id="
|
240
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000692_source')" id="l_M000692_source">show source</a> ]</p>
|
241
|
+
<div id="M000692_source" class="dyn-source">
|
242
242
|
<pre>
|
243
243
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 162</span>
|
244
244
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">subcommand</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">command_class</span>, <span class="ruby-identifier">options</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -268,17 +268,17 @@ For dispatchers, this is a convenience method for creating subcommands.
|
|
268
268
|
<div class="sectiontitle">Public Instance methods</div>
|
269
269
|
<div class="method">
|
270
270
|
<div class="title">
|
271
|
-
<a name="
|
271
|
+
<a name="M000694"></a><b>call</b>(cmd=nil, *args)
|
272
272
|
</div>
|
273
273
|
<div class="description">
|
274
274
|
<p>
|
275
|
-
For a single command (ie. a <a href="Command.html#
|
276
|
-
override <a href="Command.html#
|
275
|
+
For a single command (ie. a <a href="Command.html#M000692">subcommand</a>)
|
276
|
+
override <a href="Command.html#M000694">call</a> with arity=0.
|
277
277
|
</p>
|
278
278
|
</div>
|
279
279
|
<div class="sourcecode">
|
280
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
281
|
-
<div id="
|
280
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000694_source')" id="l_M000694_source">show source</a> ]</p>
|
281
|
+
<div id="M000694_source" class="dyn-source">
|
282
282
|
<pre>
|
283
283
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 223</span>
|
284
284
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">cmd</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -80,7 +80,7 @@ NoMethodError
|
|
80
80
|
|
81
81
|
<div class="sectiontitle">Methods</div>
|
82
82
|
<ul>
|
83
|
-
<li><a href="#
|
83
|
+
<li><a href="#M000689">new</a></li>
|
84
84
|
</ul>
|
85
85
|
|
86
86
|
|
@@ -91,11 +91,11 @@ NoMethodError
|
|
91
91
|
<div class="sectiontitle">Public Class methods</div>
|
92
92
|
<div class="method">
|
93
93
|
<div class="title">
|
94
|
-
<a name="
|
94
|
+
<a name="M000689"></a><b>new</b>(name, *arg)
|
95
95
|
</div>
|
96
96
|
<div class="sourcecode">
|
97
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
98
|
-
<div id="
|
97
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000689_source')" id="l_M000689_source">show source</a> ]</p>
|
98
|
+
<div id="M000689_source" class="dyn-source">
|
99
99
|
<pre>
|
100
100
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 78</span>
|
101
101
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>)
|
@@ -87,7 +87,7 @@ href="Command.html">Command</a> namespace.)
|
|
87
87
|
|
88
88
|
<div class="sectiontitle">Methods</div>
|
89
89
|
<ul>
|
90
|
-
<li><a href="#
|
90
|
+
<li><a href="#M000695">new</a></li>
|
91
91
|
</ul>
|
92
92
|
|
93
93
|
|
@@ -98,11 +98,11 @@ href="Command.html">Command</a> namespace.)
|
|
98
98
|
<div class="sectiontitle">Public Class methods</div>
|
99
99
|
<div class="method">
|
100
100
|
<div class="title">
|
101
|
-
<a name="
|
101
|
+
<a name="M000695"></a><b>new</b>(name, *arg)
|
102
102
|
</div>
|
103
103
|
<div class="sourcecode">
|
104
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
105
|
-
<div id="
|
104
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000695_source')" id="l_M000695_source">show source</a> ]</p>
|
105
|
+
<div id="M000695_source" class="dyn-source">
|
106
106
|
<pre>
|
107
107
|
<span class="ruby-comment cmt"># File lib/more/facets/command.rb, line 72</span>
|
108
108
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>)
|
@@ -97,7 +97,7 @@ cached versions of method calls.
|
|
97
97
|
x.cached.tick #=> 2
|
98
98
|
</pre>
|
99
99
|
<p>
|
100
|
-
You can also use to <a href="CacheDecorator.html#
|
100
|
+
You can also use to <a href="CacheDecorator.html#M000662">cache</a> a
|
101
101
|
collections of objects to gain code speed ups.
|
102
102
|
</p>
|
103
103
|
<pre>
|
@@ -122,11 +122,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
122
122
|
|
123
123
|
<div class="sectiontitle">Methods</div>
|
124
124
|
<ul>
|
125
|
-
<li><a href="#
|
126
|
-
<li><a href="#
|
127
|
-
<li><a href="#
|
128
|
-
<li><a href="#
|
129
|
-
<li><a href="#
|
125
|
+
<li><a href="#M000662">cache</a></li>
|
126
|
+
<li><a href="#M000660">method_missing</a></li>
|
127
|
+
<li><a href="#M000659">new</a></li>
|
128
|
+
<li><a href="#M000661">self</a></li>
|
129
|
+
<li><a href="#M000663">uncache</a></li>
|
130
130
|
</ul>
|
131
131
|
|
132
132
|
|
@@ -137,11 +137,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
137
137
|
<div class="sectiontitle">Public Class methods</div>
|
138
138
|
<div class="method">
|
139
139
|
<div class="title">
|
140
|
-
<a name="
|
140
|
+
<a name="M000662"></a><b>cache</b>(object)
|
141
141
|
</div>
|
142
142
|
<div class="sourcecode">
|
143
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
144
|
-
<div id="
|
143
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000662_source')" id="l_M000662_source">show source</a> ]</p>
|
144
|
+
<div id="M000662_source" class="dyn-source">
|
145
145
|
<pre>
|
146
146
|
<span class="ruby-comment cmt"># File lib/more/facets/cachedecorator.rb, line 104</span>
|
147
147
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cache</span>(<span class="ruby-identifier">object</span>)
|
@@ -153,11 +153,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
153
153
|
</div>
|
154
154
|
<div class="method">
|
155
155
|
<div class="title">
|
156
|
-
<a name="
|
156
|
+
<a name="M000659"></a><b>new</b>(object)
|
157
157
|
</div>
|
158
158
|
<div class="sourcecode">
|
159
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
160
|
-
<div id="
|
159
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000659_source')" id="l_M000659_source">show source</a> ]</p>
|
160
|
+
<div id="M000659_source" class="dyn-source">
|
161
161
|
<pre>
|
162
162
|
<span class="ruby-comment cmt"># File lib/more/facets/cachedecorator.rb, line 92</span>
|
163
163
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>)
|
@@ -170,11 +170,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
170
170
|
</div>
|
171
171
|
<div class="method">
|
172
172
|
<div class="title">
|
173
|
-
<a name="
|
173
|
+
<a name="M000663"></a><b>uncache</b>(cached_object)
|
174
174
|
</div>
|
175
175
|
<div class="sourcecode">
|
176
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
177
|
-
<div id="
|
176
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000663_source')" id="l_M000663_source">show source</a> ]</p>
|
177
|
+
<div id="M000663_source" class="dyn-source">
|
178
178
|
<pre>
|
179
179
|
<span class="ruby-comment cmt"># File lib/more/facets/cachedecorator.rb, line 108</span>
|
180
180
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">uncache</span>(<span class="ruby-identifier">cached_object</span>)
|
@@ -187,11 +187,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
187
187
|
<div class="sectiontitle">Public Instance methods</div>
|
188
188
|
<div class="method">
|
189
189
|
<div class="title">
|
190
|
-
<a name="
|
190
|
+
<a name="M000660"></a><b>method_missing</b>(method_name, *args, &block)
|
191
191
|
</div>
|
192
192
|
<div class="sourcecode">
|
193
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
194
|
-
<div id="
|
193
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000660_source')" id="l_M000660_source">show source</a> ]</p>
|
194
|
+
<div id="M000660_source" class="dyn-source">
|
195
195
|
<pre>
|
196
196
|
<span class="ruby-comment cmt"># File lib/more/facets/cachedecorator.rb, line 97</span>
|
197
197
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -204,11 +204,11 @@ Or if you prefer (it is ever so slightly safer):
|
|
204
204
|
</div>
|
205
205
|
<div class="method">
|
206
206
|
<div class="title">
|
207
|
-
<a name="
|
207
|
+
<a name="M000661"></a><b>self</b>()
|
208
208
|
</div>
|
209
209
|
<div class="sourcecode">
|
210
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
211
|
-
<div id="
|
210
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000661_source')" id="l_M000661_source">show source</a> ]</p>
|
211
|
+
<div id="M000661_source" class="dyn-source">
|
212
212
|
<pre>
|
213
213
|
<span class="ruby-comment cmt"># File lib/more/facets/cachedecorator.rb, line 102</span>
|
214
214
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-ivar">@self</span>; <span class="ruby-keyword kw">end</span>
|
@@ -100,14 +100,14 @@ See <a href="../files/intro_txt.html">intro.txt</a> for an overview.
|
|
100
100
|
|
101
101
|
<div class="sectiontitle">Methods</div>
|
102
102
|
<ul>
|
103
|
-
<li><a href="#
|
104
|
-
<li><a href="#
|
105
|
-
<li><a href="#
|
106
|
-
<li><a href="#
|
107
|
-
<li><a href="#
|
108
|
-
<li><a href="#
|
109
|
-
<li><a href="#
|
110
|
-
<li><a href="#
|
103
|
+
<li><a href="#M000409">include</a></li>
|
104
|
+
<li><a href="#M000408">include_script</a></li>
|
105
|
+
<li><a href="#M000405">load</a></li>
|
106
|
+
<li><a href="#M000402">load</a></li>
|
107
|
+
<li><a href="#M000407">load_in_module</a></li>
|
108
|
+
<li><a href="#M000404">load_path_lookup</a></li>
|
109
|
+
<li><a href="#M000403">new</a></li>
|
110
|
+
<li><a href="#M000406">require</a></li>
|
111
111
|
</ul>
|
112
112
|
|
113
113
|
|
@@ -160,17 +160,17 @@ The script file with which the Import was instantiated.
|
|
160
160
|
<div class="sectiontitle">Public Class methods</div>
|
161
161
|
<div class="method">
|
162
162
|
<div class="title">
|
163
|
-
<a name="
|
163
|
+
<a name="M000402"></a><b>load</b>(main_file, options=nil, &block)
|
164
164
|
</div>
|
165
165
|
<div class="description">
|
166
166
|
<p>
|
167
|
-
As with <a href="Capsule.html#
|
167
|
+
As with <a href="Capsule.html#M000403">new</a> but will search Ruby‘s
|
168
168
|
$LOAD_PATH first.
|
169
169
|
</p>
|
170
170
|
</div>
|
171
171
|
<div class="sourcecode">
|
172
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
173
|
-
<div id="
|
172
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000402_source')" id="l_M000402_source">show source</a> ]</p>
|
173
|
+
<div id="M000402_source" class="dyn-source">
|
174
174
|
<pre>
|
175
175
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 78</span>
|
176
176
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">main_file</span>, <span class="ruby-identifier">options</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -187,11 +187,11 @@ $LOAD_PATH first.
|
|
187
187
|
</div>
|
188
188
|
<div class="method">
|
189
189
|
<div class="title">
|
190
|
-
<a name="
|
190
|
+
<a name="M000403"></a><b>new</b>(main_file, options=nil, &block)
|
191
191
|
</div>
|
192
192
|
<div class="description">
|
193
193
|
<p>
|
194
|
-
Creates <a href="Capsule.html#
|
194
|
+
Creates <a href="Capsule.html#M000403">new</a> <a
|
195
195
|
href="Capsule.html">Capsule</a>, and loads <em>main_file</em> in the scope
|
196
196
|
of the script. If a block is given, the script is passed to it before
|
197
197
|
loading from the file, and constants can be defined as inputs to the
|
@@ -199,8 +199,8 @@ script.
|
|
199
199
|
</p>
|
200
200
|
</div>
|
201
201
|
<div class="sourcecode">
|
202
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
203
|
-
<div id="
|
202
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000403_source')" id="l_M000403_source">show source</a> ]</p>
|
203
|
+
<div id="M000403_source" class="dyn-source">
|
204
204
|
<pre>
|
205
205
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 92</span>
|
206
206
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">main_file</span>, <span class="ruby-identifier">options</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -233,11 +233,11 @@ script.
|
|
233
233
|
<div class="sectiontitle">Public Instance methods</div>
|
234
234
|
<div class="method">
|
235
235
|
<div class="title">
|
236
|
-
<a name="
|
236
|
+
<a name="M000409"></a><b>include</b>(*mods)
|
237
237
|
</div>
|
238
238
|
<div class="sourcecode">
|
239
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
240
|
-
<div id="
|
239
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000409_source')" id="l_M000409_source">show source</a> ]</p>
|
240
|
+
<div id="M000409_source" class="dyn-source">
|
241
241
|
<pre>
|
242
242
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 204</span>
|
243
243
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">mods</span>)
|
@@ -250,11 +250,11 @@ script.
|
|
250
250
|
</div>
|
251
251
|
<div class="method">
|
252
252
|
<div class="title">
|
253
|
-
<a name="
|
253
|
+
<a name="M000408"></a><b>include_script</b>(file)
|
254
254
|
</div>
|
255
255
|
<div class="sourcecode">
|
256
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
257
|
-
<div id="
|
256
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000408_source')" id="l_M000408_source">show source</a> ]</p>
|
257
|
+
<div id="M000408_source" class="dyn-source">
|
258
258
|
<pre>
|
259
259
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 193</span>
|
260
260
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include_script</span>(<span class="ruby-identifier">file</span>)
|
@@ -272,13 +272,13 @@ script.
|
|
272
272
|
</div>
|
273
273
|
<div class="method">
|
274
274
|
<div class="title">
|
275
|
-
<a name="
|
275
|
+
<a name="M000405"></a><b>load</b>(file, wrap = false)
|
276
276
|
</div>
|
277
277
|
<div class="description">
|
278
278
|
<p>
|
279
279
|
Loads <em>file</em> into the capsule. Searches relative to the local dir,
|
280
280
|
that is, the dir of the file given in the original call to <tt><a
|
281
|
-
href="Capsule.html#
|
281
|
+
href="Capsule.html#M000402">Capsule.load(file)</a></tt>, loads the file, if
|
282
282
|
found, into this <a href="Capsule.html">Capsule</a>‘s scope, and
|
283
283
|
returns true. If the file is not found, falls back to <tt>Kernel.load</tt>,
|
284
284
|
which searches on <tt>$LOAD_PATH</tt>, loads the file, if found, into
|
@@ -290,13 +290,13 @@ fallback case, when the file is not found locally.
|
|
290
290
|
</p>
|
291
291
|
<p>
|
292
292
|
Typically called from within the main file to <a
|
293
|
-
href="Capsule.html#
|
293
|
+
href="Capsule.html#M000402">load</a> additional sub files, or from those
|
294
294
|
sub files.
|
295
295
|
</p>
|
296
296
|
</div>
|
297
297
|
<div class="sourcecode">
|
298
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
299
|
-
<div id="
|
298
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000405_source')" id="l_M000405_source">show source</a> ]</p>
|
299
|
+
<div id="M000405_source" class="dyn-source">
|
300
300
|
<pre>
|
301
301
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 143</span>
|
302
302
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">wrap</span> = <span class="ruby-keyword kw">false</span>)
|
@@ -311,19 +311,19 @@ sub files.
|
|
311
311
|
</div>
|
312
312
|
<div class="method">
|
313
313
|
<div class="title">
|
314
|
-
<a name="
|
314
|
+
<a name="M000407"></a><b>load_in_module</b>(file)
|
315
315
|
</div>
|
316
316
|
<div class="description">
|
317
317
|
<p>
|
318
318
|
Loads <em>file</em> in this module‘s context. Note that
|
319
319
|
<tt>__FILE__</tt> and <tt>__LINE__</tt> work correctly in <em>file</em>.
|
320
|
-
Called by <a href="Capsule.html#
|
321
|
-
href="Capsule.html#
|
320
|
+
Called by <a href="Capsule.html#M000402">load</a> and <a
|
321
|
+
href="Capsule.html#M000406">require</a>; not normally called directly.
|
322
322
|
</p>
|
323
323
|
</div>
|
324
324
|
<div class="sourcecode">
|
325
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
326
|
-
<div id="
|
325
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000407_source')" id="l_M000407_source">show source</a> ]</p>
|
326
|
+
<div id="M000407_source" class="dyn-source">
|
327
327
|
<pre>
|
328
328
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 183</span>
|
329
329
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_in_module</span>(<span class="ruby-identifier">file</span>)
|
@@ -341,16 +341,16 @@ href="Capsule.html#M000396">require</a>; not normally called directly.
|
|
341
341
|
</div>
|
342
342
|
<div class="method">
|
343
343
|
<div class="title">
|
344
|
-
<a name="
|
344
|
+
<a name="M000404"></a><b>load_path_lookup</b>(feature)
|
345
345
|
</div>
|
346
346
|
<div class="description">
|
347
347
|
<p>
|
348
|
-
Lookup feature in <a href="Capsule.html#
|
348
|
+
Lookup feature in <a href="Capsule.html#M000402">load</a> path.
|
349
349
|
</p>
|
350
350
|
</div>
|
351
351
|
<div class="sourcecode">
|
352
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
353
|
-
<div id="
|
352
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000404_source')" id="l_M000404_source">show source</a> ]</p>
|
353
|
+
<div id="M000404_source" class="dyn-source">
|
354
354
|
<pre>
|
355
355
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 118</span>
|
356
356
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_path_lookup</span>(<span class="ruby-identifier">feature</span>)
|
@@ -365,26 +365,26 @@ Lookup feature in <a href="Capsule.html#M000392">load</a> path.
|
|
365
365
|
</div>
|
366
366
|
<div class="method">
|
367
367
|
<div class="title">
|
368
|
-
<a name="
|
368
|
+
<a name="M000406"></a><b>require</b>(feature)
|
369
369
|
</div>
|
370
370
|
<div class="description">
|
371
371
|
<p>
|
372
372
|
Analogous to <tt>Kernel#require</tt>. First tries the local dir, then falls
|
373
373
|
back to <tt>Kernel#require</tt>. Will <a
|
374
|
-
href="Capsule.html#
|
374
|
+
href="Capsule.html#M000402">load</a> a given <em>feature</em> only once.
|
375
375
|
</p>
|
376
376
|
<p>
|
377
377
|
Note that extensions (*.so, *.dll) can be required in the global scope, as
|
378
378
|
usual, but not in the local scope. (This is not much of a limitation in
|
379
379
|
practice—you wouldn‘t want to <a
|
380
|
-
href="Capsule.html#
|
380
|
+
href="Capsule.html#M000402">load</a> an extension more than once.) This
|
381
381
|
implementation falls back to <tt>Kernel#require</tt> when the argument is
|
382
382
|
an extension or is not found locally.
|
383
383
|
</p>
|
384
384
|
</div>
|
385
385
|
<div class="sourcecode">
|
386
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
387
|
-
<div id="
|
386
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000406_source')" id="l_M000406_source">show source</a> ]</p>
|
387
|
+
<div id="M000406_source" class="dyn-source">
|
388
388
|
<pre>
|
389
389
|
<span class="ruby-comment cmt"># File lib/more/facets/capsule.rb, line 164</span>
|
390
390
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(<span class="ruby-identifier">feature</span>)
|