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
@@ -88,13 +88,13 @@ Object
|
|
88
88
|
|
89
89
|
<div class="sectiontitle">Methods</div>
|
90
90
|
<ul>
|
91
|
-
<li><a href="#
|
92
|
-
<li><a href="#
|
93
|
-
<li><a href="#
|
94
|
-
<li><a href="#
|
95
|
-
<li><a href="#
|
96
|
-
<li><a href="#
|
97
|
-
<li><a href="#
|
91
|
+
<li><a href="#M000393">blank?</a></li>
|
92
|
+
<li><a href="#M000392">ergo</a></li>
|
93
|
+
<li><a href="#M000391">ergo</a></li>
|
94
|
+
<li><a href="#M000390">to_bool</a></li>
|
95
|
+
<li><a href="#M000389">to_f</a></li>
|
96
|
+
<li><a href="#M000388">to_f</a></li>
|
97
|
+
<li><a href="#M000387">to_h</a></li>
|
98
98
|
</ul>
|
99
99
|
|
100
100
|
|
@@ -105,11 +105,11 @@ Object
|
|
105
105
|
<div class="sectiontitle">Public Instance methods</div>
|
106
106
|
<div class="method">
|
107
107
|
<div class="title">
|
108
|
-
<a name="
|
108
|
+
<a name="M000393"></a><b>blank?</b>()
|
109
109
|
</div>
|
110
110
|
<div class="sourcecode">
|
111
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
112
|
-
<div id="
|
111
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000393_source')" id="l_M000393_source">show source</a> ]</p>
|
112
|
+
<div id="M000393_source" class="dyn-source">
|
113
113
|
<pre>
|
114
114
|
<span class="ruby-comment cmt"># File lib/core/facets/blank.rb, line 20</span>
|
115
115
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blank?</span>
|
@@ -121,11 +121,11 @@ Object
|
|
121
121
|
</div>
|
122
122
|
<div class="method">
|
123
123
|
<div class="title">
|
124
|
-
<a name="
|
124
|
+
<a name="M000392"></a><b>ergo</b>()
|
125
125
|
</div>
|
126
126
|
<div class="description">
|
127
127
|
<p>
|
128
|
-
Compliments <a href="Kernel.html#
|
128
|
+
Compliments <a href="Kernel.html#M000626">Kernel#ergo</a>.
|
129
129
|
</p>
|
130
130
|
<pre>
|
131
131
|
"a".ergo{ |o| o.upcase } #=> "A"
|
@@ -135,8 +135,8 @@ Compliments <a href="Kernel.html#M000632">Kernel#ergo</a>.
|
|
135
135
|
</pre>
|
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('M000392_source')" id="l_M000392_source">show source</a> ]</p>
|
139
|
+
<div id="M000392_source" class="dyn-source">
|
140
140
|
<pre>
|
141
141
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/ergo.rb, line 36</span>
|
142
142
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ergo</span>
|
@@ -149,11 +149,11 @@ Compliments <a href="Kernel.html#M000632">Kernel#ergo</a>.
|
|
149
149
|
</div>
|
150
150
|
<div class="method">
|
151
151
|
<div class="title">
|
152
|
-
<a name="
|
152
|
+
<a name="M000391"></a><b>ergo</b>()
|
153
153
|
</div>
|
154
154
|
<div class="description">
|
155
155
|
<p>
|
156
|
-
Compliments <a href="Kernel.html#
|
156
|
+
Compliments <a href="Kernel.html#M000626">Kernel#ergo</a>.
|
157
157
|
</p>
|
158
158
|
<pre>
|
159
159
|
"a".ergo{ |o| o.upcase } #=> "A"
|
@@ -163,8 +163,8 @@ Compliments <a href="Kernel.html#M000632">Kernel#ergo</a>.
|
|
163
163
|
</pre>
|
164
164
|
</div>
|
165
165
|
<div class="sourcecode">
|
166
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
167
|
-
<div id="
|
166
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000391_source')" id="l_M000391_source">show source</a> ]</p>
|
167
|
+
<div id="M000391_source" class="dyn-source">
|
168
168
|
<pre>
|
169
169
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/ergo.rb, line 36</span>
|
170
170
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ergo</span>
|
@@ -177,11 +177,11 @@ Compliments <a href="Kernel.html#M000632">Kernel#ergo</a>.
|
|
177
177
|
</div>
|
178
178
|
<div class="method">
|
179
179
|
<div class="title">
|
180
|
-
<a name="
|
180
|
+
<a name="M000390"></a><b>to_bool</b>()
|
181
181
|
</div>
|
182
182
|
<div class="sourcecode">
|
183
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
184
|
-
<div id="
|
183
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000390_source')" id="l_M000390_source">show source</a> ]</p>
|
184
|
+
<div id="M000390_source" class="dyn-source">
|
185
185
|
<pre>
|
186
186
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 153</span>
|
187
187
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_bool</span>
|
@@ -193,11 +193,11 @@ Compliments <a href="Kernel.html#M000632">Kernel#ergo</a>.
|
|
193
193
|
</div>
|
194
194
|
<div class="method">
|
195
195
|
<div class="title">
|
196
|
-
<a name="
|
196
|
+
<a name="M000389"></a><b>to_f</b>()
|
197
197
|
</div>
|
198
198
|
<div class="description">
|
199
199
|
<p>
|
200
|
-
Allows <tt>nil</tt> to respond to <a href="NilClass.html#
|
200
|
+
Allows <tt>nil</tt> to respond to <a href="NilClass.html#M000388">to_f</a>.
|
201
201
|
Always returns <tt>0</tt>.
|
202
202
|
</p>
|
203
203
|
<pre>
|
@@ -207,8 +207,8 @@ Always returns <tt>0</tt>.
|
|
207
207
|
</pre>
|
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('M000389_source')" id="l_M000389_source">show source</a> ]</p>
|
211
|
+
<div id="M000389_source" class="dyn-source">
|
212
212
|
<pre>
|
213
213
|
<span class="ruby-comment cmt"># File lib/core/facets/nilclass/to_f.rb, line 12</span>
|
214
214
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span>; <span class="ruby-value">0</span><span class="ruby-value">.0</span>; <span class="ruby-keyword kw">end</span>
|
@@ -218,11 +218,11 @@ Always returns <tt>0</tt>.
|
|
218
218
|
</div>
|
219
219
|
<div class="method">
|
220
220
|
<div class="title">
|
221
|
-
<a name="
|
221
|
+
<a name="M000388"></a><b>to_f</b>()
|
222
222
|
</div>
|
223
223
|
<div class="description">
|
224
224
|
<p>
|
225
|
-
Allows <tt>nil</tt> to respond to <a href="NilClass.html#
|
225
|
+
Allows <tt>nil</tt> to respond to <a href="NilClass.html#M000388">to_f</a>.
|
226
226
|
Always returns <tt>0</tt>.
|
227
227
|
</p>
|
228
228
|
<pre>
|
@@ -232,8 +232,8 @@ Always returns <tt>0</tt>.
|
|
232
232
|
</pre>
|
233
233
|
</div>
|
234
234
|
<div class="sourcecode">
|
235
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
236
|
-
<div id="
|
235
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000388_source')" id="l_M000388_source">show source</a> ]</p>
|
236
|
+
<div id="M000388_source" class="dyn-source">
|
237
237
|
<pre>
|
238
238
|
<span class="ruby-comment cmt"># File lib/core/facets/nilclass/to_f.rb, line 12</span>
|
239
239
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span>; <span class="ruby-value">0</span><span class="ruby-value">.0</span>; <span class="ruby-keyword kw">end</span>
|
@@ -243,7 +243,7 @@ Always returns <tt>0</tt>.
|
|
243
243
|
</div>
|
244
244
|
<div class="method">
|
245
245
|
<div class="title">
|
246
|
-
<a name="
|
246
|
+
<a name="M000387"></a><b>to_h</b>()
|
247
247
|
</div>
|
248
248
|
<div class="description">
|
249
249
|
<p>
|
@@ -257,8 +257,8 @@ CREDIT: Trans
|
|
257
257
|
</p>
|
258
258
|
</div>
|
259
259
|
<div class="sourcecode">
|
260
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
261
|
-
<div id="
|
260
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000387_source')" id="l_M000387_source">show source</a> ]</p>
|
261
|
+
<div id="M000387_source" class="dyn-source">
|
262
262
|
<pre>
|
263
263
|
<span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 84</span>
|
264
264
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>; {}; <span class="ruby-keyword kw">end</span>
|
@@ -89,16 +89,16 @@ Object
|
|
89
89
|
|
90
90
|
<div class="sectiontitle">Methods</div>
|
91
91
|
<ul>
|
92
|
-
<li><a href="#
|
93
|
-
<li><a href="#
|
94
|
-
<li><a href="#
|
95
|
-
<li><a href="#
|
96
|
-
<li><a href="#
|
97
|
-
<li><a href="#
|
98
|
-
<li><a href="#
|
99
|
-
<li><a href="#
|
100
|
-
<li><a href="#
|
101
|
-
<li><a href="#
|
92
|
+
<li><a href="#M000380">approx?</a></li>
|
93
|
+
<li><a href="#M000384">approx?</a></li>
|
94
|
+
<li><a href="#M000386">blank?</a></li>
|
95
|
+
<li><a href="#M000381">distance</a></li>
|
96
|
+
<li><a href="#M000377">distance</a></li>
|
97
|
+
<li><a href="#M000382">round_at</a></li>
|
98
|
+
<li><a href="#M000378">round_at</a></li>
|
99
|
+
<li><a href="#M000383">round_to</a></li>
|
100
|
+
<li><a href="#M000379">round_to</a></li>
|
101
|
+
<li><a href="#M000385">to_b</a></li>
|
102
102
|
</ul>
|
103
103
|
|
104
104
|
|
@@ -109,7 +109,7 @@ Object
|
|
109
109
|
<div class="sectiontitle">Public Instance methods</div>
|
110
110
|
<div class="method">
|
111
111
|
<div class="title">
|
112
|
-
<a name="
|
112
|
+
<a name="M000380"></a><b>approx?</b>(x, n=0.01)
|
113
113
|
</div>
|
114
114
|
<div class="description">
|
115
115
|
<p>
|
@@ -121,8 +121,8 @@ degree. Defaults to 100ths if the degree is not specified.
|
|
121
121
|
</pre>
|
122
122
|
</div>
|
123
123
|
<div class="sourcecode">
|
124
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
125
|
-
<div id="
|
124
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000380_source')" id="l_M000380_source">show source</a> ]</p>
|
125
|
+
<div id="M000380_source" class="dyn-source">
|
126
126
|
<pre>
|
127
127
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/approx.rb, line 9</span>
|
128
128
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">approx?</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">n</span>=<span class="ruby-value">0</span><span class="ruby-value">.01</span>)
|
@@ -135,7 +135,7 @@ degree. Defaults to 100ths if the degree is not specified.
|
|
135
135
|
</div>
|
136
136
|
<div class="method">
|
137
137
|
<div class="title">
|
138
|
-
<a name="
|
138
|
+
<a name="M000384"></a><b>approx?</b>(x, n=0.01)
|
139
139
|
</div>
|
140
140
|
<div class="description">
|
141
141
|
<p>
|
@@ -147,8 +147,8 @@ degree. Defaults to 100ths if the degree is not specified.
|
|
147
147
|
</pre>
|
148
148
|
</div>
|
149
149
|
<div class="sourcecode">
|
150
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
151
|
-
<div id="
|
150
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000384_source')" id="l_M000384_source">show source</a> ]</p>
|
151
|
+
<div id="M000384_source" class="dyn-source">
|
152
152
|
<pre>
|
153
153
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/approx.rb, line 9</span>
|
154
154
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">approx?</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">n</span>=<span class="ruby-value">0</span><span class="ruby-value">.01</span>)
|
@@ -161,11 +161,11 @@ degree. Defaults to 100ths if the degree is not specified.
|
|
161
161
|
</div>
|
162
162
|
<div class="method">
|
163
163
|
<div class="title">
|
164
|
-
<a name="
|
164
|
+
<a name="M000386"></a><b>blank?</b>()
|
165
165
|
</div>
|
166
166
|
<div class="sourcecode">
|
167
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
168
|
-
<div id="
|
167
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000386_source')" id="l_M000386_source">show source</a> ]</p>
|
168
|
+
<div id="M000386_source" class="dyn-source">
|
169
169
|
<pre>
|
170
170
|
<span class="ruby-comment cmt"># File lib/core/facets/blank.rb, line 56</span>
|
171
171
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blank?</span>
|
@@ -177,11 +177,11 @@ degree. Defaults to 100ths if the degree is not specified.
|
|
177
177
|
</div>
|
178
178
|
<div class="method">
|
179
179
|
<div class="title">
|
180
|
-
<a name="
|
180
|
+
<a name="M000381"></a><b>distance</b>(other)
|
181
181
|
</div>
|
182
182
|
<div class="description">
|
183
183
|
<p>
|
184
|
-
Returns the <a href="Numeric.html#
|
184
|
+
Returns the <a href="Numeric.html#M000377">distance</a> between self an
|
185
185
|
another value. This is the same as #- but it provides an alternative for
|
186
186
|
common naming between variant classes.
|
187
187
|
</p>
|
@@ -190,8 +190,8 @@ common naming between variant classes.
|
|
190
190
|
</pre>
|
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('M000381_source')" id="l_M000381_source">show source</a> ]</p>
|
194
|
+
<div id="M000381_source" class="dyn-source">
|
195
195
|
<pre>
|
196
196
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/distance.rb, line 9</span>
|
197
197
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">other</span>)
|
@@ -203,11 +203,11 @@ common naming between variant classes.
|
|
203
203
|
</div>
|
204
204
|
<div class="method">
|
205
205
|
<div class="title">
|
206
|
-
<a name="
|
206
|
+
<a name="M000377"></a><b>distance</b>(other)
|
207
207
|
</div>
|
208
208
|
<div class="description">
|
209
209
|
<p>
|
210
|
-
Returns the <a href="Numeric.html#
|
210
|
+
Returns the <a href="Numeric.html#M000377">distance</a> between self an
|
211
211
|
another value. This is the same as #- but it provides an alternative for
|
212
212
|
common naming between variant classes.
|
213
213
|
</p>
|
@@ -216,8 +216,8 @@ common naming between variant classes.
|
|
216
216
|
</pre>
|
217
217
|
</div>
|
218
218
|
<div class="sourcecode">
|
219
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
220
|
-
<div id="
|
219
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000377_source')" id="l_M000377_source">show source</a> ]</p>
|
220
|
+
<div id="M000377_source" class="dyn-source">
|
221
221
|
<pre>
|
222
222
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/distance.rb, line 9</span>
|
223
223
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">other</span>)
|
@@ -229,7 +229,7 @@ common naming between variant classes.
|
|
229
229
|
</div>
|
230
230
|
<div class="method">
|
231
231
|
<div class="title">
|
232
|
-
<a name="
|
232
|
+
<a name="M000382"></a><b>round_at</b>(*args)
|
233
233
|
</div>
|
234
234
|
<div class="description">
|
235
235
|
<p>
|
@@ -241,12 +241,12 @@ lib is in the numeric folder, but we‘ll add this here for
|
|
241
241
|
convenience.
|
242
242
|
</p>
|
243
243
|
<p>
|
244
|
-
See <a href="Float.html#
|
244
|
+
See <a href="Float.html#M000369">Float#round_at</a>.
|
245
245
|
</p>
|
246
246
|
</div>
|
247
247
|
<div class="sourcecode">
|
248
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
249
|
-
<div id="
|
248
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000382_source')" id="l_M000382_source">show source</a> ]</p>
|
249
|
+
<div id="M000382_source" class="dyn-source">
|
250
250
|
<pre>
|
251
251
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 11</span>
|
252
252
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -258,7 +258,7 @@ See <a href="Float.html#M000393">Float#round_at</a>.
|
|
258
258
|
</div>
|
259
259
|
<div class="method">
|
260
260
|
<div class="title">
|
261
|
-
<a name="
|
261
|
+
<a name="M000378"></a><b>round_at</b>(*args)
|
262
262
|
</div>
|
263
263
|
<div class="description">
|
264
264
|
<p>
|
@@ -270,12 +270,12 @@ lib is in the numeric folder, but we‘ll add this here for
|
|
270
270
|
convenience.
|
271
271
|
</p>
|
272
272
|
<p>
|
273
|
-
See <a href="Float.html#
|
273
|
+
See <a href="Float.html#M000369">Float#round_at</a>.
|
274
274
|
</p>
|
275
275
|
</div>
|
276
276
|
<div class="sourcecode">
|
277
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
278
|
-
<div id="
|
277
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000378_source')" id="l_M000378_source">show source</a> ]</p>
|
278
|
+
<div id="M000378_source" class="dyn-source">
|
279
279
|
<pre>
|
280
280
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 11</span>
|
281
281
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -287,16 +287,16 @@ See <a href="Float.html#M000393">Float#round_at</a>.
|
|
287
287
|
</div>
|
288
288
|
<div class="method">
|
289
289
|
<div class="title">
|
290
|
-
<a name="
|
290
|
+
<a name="M000383"></a><b>round_to</b>(*args)
|
291
291
|
</div>
|
292
292
|
<div class="description">
|
293
293
|
<p>
|
294
|
-
See <a href="Float.html#
|
294
|
+
See <a href="Float.html#M000370">Float#round_to</a>.
|
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('M000383_source')" id="l_M000383_source">show source</a> ]</p>
|
299
|
+
<div id="M000383_source" class="dyn-source">
|
300
300
|
<pre>
|
301
301
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 17</span>
|
302
302
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -308,16 +308,16 @@ See <a href="Float.html#M000394">Float#round_to</a>.
|
|
308
308
|
</div>
|
309
309
|
<div class="method">
|
310
310
|
<div class="title">
|
311
|
-
<a name="
|
311
|
+
<a name="M000379"></a><b>round_to</b>(*args)
|
312
312
|
</div>
|
313
313
|
<div class="description">
|
314
314
|
<p>
|
315
|
-
See <a href="Float.html#
|
315
|
+
See <a href="Float.html#M000370">Float#round_to</a>.
|
316
316
|
</p>
|
317
317
|
</div>
|
318
318
|
<div class="sourcecode">
|
319
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
320
|
-
<div id="
|
319
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000379_source')" id="l_M000379_source">show source</a> ]</p>
|
320
|
+
<div id="M000379_source" class="dyn-source">
|
321
321
|
<pre>
|
322
322
|
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 17</span>
|
323
323
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -329,7 +329,7 @@ See <a href="Float.html#M000394">Float#round_to</a>.
|
|
329
329
|
</div>
|
330
330
|
<div class="method">
|
331
331
|
<div class="title">
|
332
|
-
<a name="
|
332
|
+
<a name="M000385"></a><b>to_b</b>()
|
333
333
|
</div>
|
334
334
|
<div class="description">
|
335
335
|
<p>
|
@@ -343,8 +343,8 @@ true.
|
|
343
343
|
</pre>
|
344
344
|
</div>
|
345
345
|
<div class="sourcecode">
|
346
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
347
|
-
<div id="
|
346
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000385_source')" id="l_M000385_source">show source</a> ]</p>
|
347
|
+
<div id="M000385_source" class="dyn-source">
|
348
348
|
<pre>
|
349
349
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 76</span>
|
350
350
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_b</span>
|
@@ -82,7 +82,7 @@ Object
|
|
82
82
|
|
83
83
|
<div class="sectiontitle">Methods</div>
|
84
84
|
<ul>
|
85
|
-
<li><a href="#
|
85
|
+
<li><a href="#M000401">to_bool</a></li>
|
86
86
|
</ul>
|
87
87
|
|
88
88
|
|
@@ -93,11 +93,11 @@ Object
|
|
93
93
|
<div class="sectiontitle">Public Instance methods</div>
|
94
94
|
<div class="method">
|
95
95
|
<div class="title">
|
96
|
-
<a name="
|
96
|
+
<a name="M000401"></a><b>to_bool</b>()
|
97
97
|
</div>
|
98
98
|
<div class="sourcecode">
|
99
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
100
|
-
<div id="
|
99
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000401_source')" id="l_M000401_source">show source</a> ]</p>
|
100
|
+
<div id="M000401_source" class="dyn-source">
|
101
101
|
<pre>
|
102
102
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 135</span>
|
103
103
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_bool</span>
|
@@ -59,13 +59,11 @@
|
|
59
59
|
<td>
|
60
60
|
<a href="../files/lib/core/facets/proc/update_rb.html">lib/core/facets/proc/update.rb</a>
|
61
61
|
<a href="../files/lib/core/facets/proc/curry_rb.html">lib/core/facets/proc/curry.rb</a>
|
62
|
-
<a href="../files/lib/core/facets/proc/partial_rb.html">lib/core/facets/proc/partial.rb</a>
|
63
62
|
<a href="../files/lib/core/facets/proc/compose_rb.html">lib/core/facets/proc/compose.rb</a>
|
64
63
|
<a href="../files/lib/core/facets/proc/to_method_rb.html">lib/core/facets/proc/to_method.rb</a>
|
65
64
|
<a href="../files/lib/core/facets/proc/bind_rb.html">lib/core/facets/proc/bind.rb</a>
|
66
65
|
<a href="../files/lib/core/facets/proc/update_rb.html">lib/core/facets/proc/update.rb</a>
|
67
66
|
<a href="../files/lib/core/facets/proc/curry_rb.html">lib/core/facets/proc/curry.rb</a>
|
68
|
-
<a href="../files/lib/core/facets/proc/partial_rb.html">lib/core/facets/proc/partial.rb</a>
|
69
67
|
<a href="../files/lib/core/facets/proc/compose_rb.html">lib/core/facets/proc/compose.rb</a>
|
70
68
|
<a href="../files/lib/core/facets/proc/to_method_rb.html">lib/core/facets/proc/to_method.rb</a>
|
71
69
|
<a href="../files/lib/core/facets/proc/bind_rb.html">lib/core/facets/proc/bind.rb</a>
|
@@ -93,18 +91,16 @@ Object
|
|
93
91
|
|
94
92
|
<div class="sectiontitle">Methods</div>
|
95
93
|
<ul>
|
96
|
-
<li><a href="#
|
97
|
-
<li><a href="#
|
98
|
-
<li><a href="#
|
99
|
-
<li><a href="#
|
100
|
-
<li><a href="#
|
101
|
-
<li><a href="#
|
102
|
-
<li><a href="#
|
103
|
-
<li><a href="#
|
104
|
-
<li><a href="#
|
105
|
-
<li><a href="#
|
106
|
-
<li><a href="#M000310">to_method</a></li>
|
107
|
-
<li><a href="#M000304">to_method</a></li>
|
94
|
+
<li><a href="#M000289">*</a></li>
|
95
|
+
<li><a href="#M000284">*</a></li>
|
96
|
+
<li><a href="#M000291">bind</a></li>
|
97
|
+
<li><a href="#M000286">bind</a></li>
|
98
|
+
<li><a href="#M000283">compose</a></li>
|
99
|
+
<li><a href="#M000288">compose</a></li>
|
100
|
+
<li><a href="#M000287">curry</a></li>
|
101
|
+
<li><a href="#M000282">curry</a></li>
|
102
|
+
<li><a href="#M000290">to_method</a></li>
|
103
|
+
<li><a href="#M000285">to_method</a></li>
|
108
104
|
</ul>
|
109
105
|
|
110
106
|
|
@@ -115,12 +111,12 @@ Object
|
|
115
111
|
<div class="sectiontitle">Public Instance methods</div>
|
116
112
|
<div class="method">
|
117
113
|
<div class="title">
|
118
|
-
<a name="
|
114
|
+
<a name="M000289"></a><b>*</b>(x)
|
119
115
|
</div>
|
120
116
|
<div class="description">
|
121
117
|
<p>
|
122
|
-
Operator for <a href="Proc.html#
|
123
|
-
href="Integer.html#
|
118
|
+
Operator for <a href="Proc.html#M000283">Proc#compose</a> and <a
|
119
|
+
href="Integer.html#M000025">Integer#times_collect</a>/of.
|
124
120
|
</p>
|
125
121
|
<pre>
|
126
122
|
a = lambda { |x| x + 4 }
|
@@ -133,8 +129,8 @@ href="Integer.html#M000027">Integer#times_collect</a>/of.
|
|
133
129
|
</pre>
|
134
130
|
</div>
|
135
131
|
<div class="sourcecode">
|
136
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
137
|
-
<div id="
|
132
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000289_source')" id="l_M000289_source">show source</a> ]</p>
|
133
|
+
<div id="M000289_source" class="dyn-source">
|
138
134
|
<pre>
|
139
135
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/compose.rb, line 29</span>
|
140
136
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">x</span>)
|
@@ -154,12 +150,12 @@ href="Integer.html#M000027">Integer#times_collect</a>/of.
|
|
154
150
|
</div>
|
155
151
|
<div class="method">
|
156
152
|
<div class="title">
|
157
|
-
<a name="
|
153
|
+
<a name="M000284"></a><b>*</b>(x)
|
158
154
|
</div>
|
159
155
|
<div class="description">
|
160
156
|
<p>
|
161
|
-
Operator for <a href="Proc.html#
|
162
|
-
href="Integer.html#
|
157
|
+
Operator for <a href="Proc.html#M000283">Proc#compose</a> and <a
|
158
|
+
href="Integer.html#M000025">Integer#times_collect</a>/of.
|
163
159
|
</p>
|
164
160
|
<pre>
|
165
161
|
a = lambda { |x| x + 4 }
|
@@ -172,8 +168,8 @@ href="Integer.html#M000027">Integer#times_collect</a>/of.
|
|
172
168
|
</pre>
|
173
169
|
</div>
|
174
170
|
<div class="sourcecode">
|
175
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
176
|
-
<div id="
|
171
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000284_source')" id="l_M000284_source">show source</a> ]</p>
|
172
|
+
<div id="M000284_source" class="dyn-source">
|
177
173
|
<pre>
|
178
174
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/compose.rb, line 29</span>
|
179
175
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">x</span>)
|
@@ -193,7 +189,7 @@ href="Integer.html#M000027">Integer#times_collect</a>/of.
|
|
193
189
|
</div>
|
194
190
|
<div class="method">
|
195
191
|
<div class="title">
|
196
|
-
<a name="
|
192
|
+
<a name="M000291"></a><b>bind</b>(object)
|
197
193
|
</div>
|
198
194
|
<div class="description">
|
199
195
|
<p>
|
@@ -209,8 +205,8 @@ NOTE: This version comes from Rails. The old Facets
|
|
209
205
|
</pre>
|
210
206
|
</div>
|
211
207
|
<div class="sourcecode">
|
212
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
213
|
-
<div id="
|
208
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000291_source')" id="l_M000291_source">show source</a> ]</p>
|
209
|
+
<div id="M000291_source" class="dyn-source">
|
214
210
|
<pre>
|
215
211
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/bind.rb, line 10</span>
|
216
212
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>(<span class="ruby-identifier">object</span>)
|
@@ -229,7 +225,7 @@ NOTE: This version comes from Rails. The old Facets
|
|
229
225
|
</div>
|
230
226
|
<div class="method">
|
231
227
|
<div class="title">
|
232
|
-
<a name="
|
228
|
+
<a name="M000286"></a><b>bind</b>(object)
|
233
229
|
</div>
|
234
230
|
<div class="description">
|
235
231
|
<p>
|
@@ -245,8 +241,8 @@ NOTE: This version comes from Rails. The old Facets
|
|
245
241
|
</pre>
|
246
242
|
</div>
|
247
243
|
<div class="sourcecode">
|
248
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
249
|
-
<div id="
|
244
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000286_source')" id="l_M000286_source">show source</a> ]</p>
|
245
|
+
<div id="M000286_source" class="dyn-source">
|
250
246
|
<pre>
|
251
247
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/bind.rb, line 10</span>
|
252
248
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bind</span>(<span class="ruby-identifier">object</span>)
|
@@ -265,7 +261,7 @@ NOTE: This version comes from Rails. The old Facets
|
|
265
261
|
</div>
|
266
262
|
<div class="method">
|
267
263
|
<div class="title">
|
268
|
-
<a name="
|
264
|
+
<a name="M000283"></a><b>compose</b>(g)
|
269
265
|
</div>
|
270
266
|
<div class="description">
|
271
267
|
<p>
|
@@ -283,8 +279,8 @@ order.
|
|
283
279
|
</pre>
|
284
280
|
</div>
|
285
281
|
<div class="sourcecode">
|
286
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
287
|
-
<div id="
|
282
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000283_source')" id="l_M000283_source">show source</a> ]</p>
|
283
|
+
<div id="M000283_source" class="dyn-source">
|
288
284
|
<pre>
|
289
285
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/compose.rb, line 14</span>
|
290
286
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compose</span>(<span class="ruby-identifier">g</span>)
|
@@ -297,7 +293,7 @@ order.
|
|
297
293
|
</div>
|
298
294
|
<div class="method">
|
299
295
|
<div class="title">
|
300
|
-
<a name="
|
296
|
+
<a name="M000288"></a><b>compose</b>(g)
|
301
297
|
</div>
|
302
298
|
<div class="description">
|
303
299
|
<p>
|
@@ -315,8 +311,8 @@ order.
|
|
315
311
|
</pre>
|
316
312
|
</div>
|
317
313
|
<div class="sourcecode">
|
318
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
319
|
-
<div id="
|
314
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000288_source')" id="l_M000288_source">show source</a> ]</p>
|
315
|
+
<div id="M000288_source" class="dyn-source">
|
320
316
|
<pre>
|
321
317
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/compose.rb, line 14</span>
|
322
318
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compose</span>(<span class="ruby-identifier">g</span>)
|
@@ -329,7 +325,7 @@ order.
|
|
329
325
|
</div>
|
330
326
|
<div class="method">
|
331
327
|
<div class="title">
|
332
|
-
<a name="
|
328
|
+
<a name="M000287"></a><b>curry</b>(*args)
|
333
329
|
</div>
|
334
330
|
<div class="description">
|
335
331
|
<p>
|
@@ -337,13 +333,13 @@ Curry <a href="Proc.html">Proc</a> object into new <a
|
|
337
333
|
href="Proc.html">Proc</a> object.
|
338
334
|
</p>
|
339
335
|
<p>
|
340
|
-
TODO: Utilize Ruby 1.9‘s <a href="Proc.html#
|
336
|
+
TODO: Utilize Ruby 1.9‘s <a href="Proc.html#M000282">curry</a>
|
341
337
|
method.
|
342
338
|
</p>
|
343
339
|
</div>
|
344
340
|
<div class="sourcecode">
|
345
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
346
|
-
<div id="
|
341
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000287_source')" id="l_M000287_source">show source</a> ]</p>
|
342
|
+
<div id="M000287_source" class="dyn-source">
|
347
343
|
<pre>
|
348
344
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/curry.rb, line 7</span>
|
349
345
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -374,7 +370,7 @@ method.
|
|
374
370
|
</div>
|
375
371
|
<div class="method">
|
376
372
|
<div class="title">
|
377
|
-
<a name="
|
373
|
+
<a name="M000282"></a><b>curry</b>(*args)
|
378
374
|
</div>
|
379
375
|
<div class="description">
|
380
376
|
<p>
|
@@ -382,13 +378,13 @@ Curry <a href="Proc.html">Proc</a> object into new <a
|
|
382
378
|
href="Proc.html">Proc</a> object.
|
383
379
|
</p>
|
384
380
|
<p>
|
385
|
-
TODO: Utilize Ruby 1.9‘s <a href="Proc.html#
|
381
|
+
TODO: Utilize Ruby 1.9‘s <a href="Proc.html#M000282">curry</a>
|
386
382
|
method.
|
387
383
|
</p>
|
388
384
|
</div>
|
389
385
|
<div class="sourcecode">
|
390
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
391
|
-
<div id="
|
386
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000282_source')" id="l_M000282_source">show source</a> ]</p>
|
387
|
+
<div id="M000282_source" class="dyn-source">
|
392
388
|
<pre>
|
393
389
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/curry.rb, line 7</span>
|
394
390
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -419,91 +415,7 @@ method.
|
|
419
415
|
</div>
|
420
416
|
<div class="method">
|
421
417
|
<div class="title">
|
422
|
-
<a name="
|
423
|
-
</div>
|
424
|
-
<div class="description">
|
425
|
-
<p>
|
426
|
-
Convert a <a href="Proc.html">Proc</a> object into new <a
|
427
|
-
href="Proc.html#M000301">partial</a> <a href="Proc.html">Proc</a> object.
|
428
|
-
</p>
|
429
|
-
<pre>
|
430
|
-
a = proc { |a,b,c| a+b+c }
|
431
|
-
b = a.partial(__, 2, __)
|
432
|
-
b[1,3] #=> 6
|
433
|
-
</pre>
|
434
|
-
<p>
|
435
|
-
This method is similar to <a href="Proc.html#M000300">Proc#curry</a>.
|
436
|
-
</p>
|
437
|
-
<p>
|
438
|
-
CREDT Trans
|
439
|
-
</p>
|
440
|
-
<p>
|
441
|
-
TODO: Parhaps ArgumentError would suffice, and we don‘t need <a
|
442
|
-
href="MissingArgument.html">MissingArgument</a>?
|
443
|
-
</p>
|
444
|
-
</div>
|
445
|
-
<div class="sourcecode">
|
446
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000301_source')" id="l_M000301_source">show source</a> ]</p>
|
447
|
-
<div id="M000301_source" class="dyn-source">
|
448
|
-
<pre>
|
449
|
-
<span class="ruby-comment cmt"># File lib/core/facets/proc/partial.rb, line 27</span>
|
450
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partial</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
451
|
-
<span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">spice</span><span class="ruby-operator">|</span>
|
452
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
453
|
-
<span class="ruby-constant">MissingArgument</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">a</span> <span class="ruby-value">? </span><span class="ruby-identifier">spice</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">a</span>
|
454
|
-
<span class="ruby-keyword kw">end</span>
|
455
|
-
<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">result</span>)
|
456
|
-
<span class="ruby-keyword kw">end</span>
|
457
|
-
<span class="ruby-keyword kw">end</span>
|
458
|
-
</pre>
|
459
|
-
</div>
|
460
|
-
</div>
|
461
|
-
</div>
|
462
|
-
<div class="method">
|
463
|
-
<div class="title">
|
464
|
-
<a name="M000307"></a><b>partial</b>(*args)
|
465
|
-
</div>
|
466
|
-
<div class="description">
|
467
|
-
<p>
|
468
|
-
Convert a <a href="Proc.html">Proc</a> object into new <a
|
469
|
-
href="Proc.html#M000301">partial</a> <a href="Proc.html">Proc</a> object.
|
470
|
-
</p>
|
471
|
-
<pre>
|
472
|
-
a = proc { |a,b,c| a+b+c }
|
473
|
-
b = a.partial(__, 2, __)
|
474
|
-
b[1,3] #=> 6
|
475
|
-
</pre>
|
476
|
-
<p>
|
477
|
-
This method is similar to <a href="Proc.html#M000300">Proc#curry</a>.
|
478
|
-
</p>
|
479
|
-
<p>
|
480
|
-
CREDT Trans
|
481
|
-
</p>
|
482
|
-
<p>
|
483
|
-
TODO: Parhaps ArgumentError would suffice, and we don‘t need <a
|
484
|
-
href="MissingArgument.html">MissingArgument</a>?
|
485
|
-
</p>
|
486
|
-
</div>
|
487
|
-
<div class="sourcecode">
|
488
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000307_source')" id="l_M000307_source">show source</a> ]</p>
|
489
|
-
<div id="M000307_source" class="dyn-source">
|
490
|
-
<pre>
|
491
|
-
<span class="ruby-comment cmt"># File lib/core/facets/proc/partial.rb, line 27</span>
|
492
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partial</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
493
|
-
<span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">spice</span><span class="ruby-operator">|</span>
|
494
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
495
|
-
<span class="ruby-constant">MissingArgument</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">a</span> <span class="ruby-value">? </span><span class="ruby-identifier">spice</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">a</span>
|
496
|
-
<span class="ruby-keyword kw">end</span>
|
497
|
-
<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">result</span>)
|
498
|
-
<span class="ruby-keyword kw">end</span>
|
499
|
-
<span class="ruby-keyword kw">end</span>
|
500
|
-
</pre>
|
501
|
-
</div>
|
502
|
-
</div>
|
503
|
-
</div>
|
504
|
-
<div class="method">
|
505
|
-
<div class="title">
|
506
|
-
<a name="M000310"></a><b>to_method</b>(object, name=nil)
|
418
|
+
<a name="M000290"></a><b>to_method</b>(object, name=nil)
|
507
419
|
</div>
|
508
420
|
<div class="description">
|
509
421
|
<p>
|
@@ -516,8 +428,8 @@ Convert <a href="Proc.html">Proc</a> to method.
|
|
516
428
|
</pre>
|
517
429
|
</div>
|
518
430
|
<div class="sourcecode">
|
519
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
520
|
-
<div id="
|
431
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000290_source')" id="l_M000290_source">show source</a> ]</p>
|
432
|
+
<div id="M000290_source" class="dyn-source">
|
521
433
|
<pre>
|
522
434
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/to_method.rb, line 11</span>
|
523
435
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_method</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -546,7 +458,7 @@ Convert <a href="Proc.html">Proc</a> to method.
|
|
546
458
|
</div>
|
547
459
|
<div class="method">
|
548
460
|
<div class="title">
|
549
|
-
<a name="
|
461
|
+
<a name="M000285"></a><b>to_method</b>(object, name=nil)
|
550
462
|
</div>
|
551
463
|
<div class="description">
|
552
464
|
<p>
|
@@ -559,8 +471,8 @@ Convert <a href="Proc.html">Proc</a> to method.
|
|
559
471
|
</pre>
|
560
472
|
</div>
|
561
473
|
<div class="sourcecode">
|
562
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
563
|
-
<div id="
|
474
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000285_source')" id="l_M000285_source">show source</a> ]</p>
|
475
|
+
<div id="M000285_source" class="dyn-source">
|
564
476
|
<pre>
|
565
477
|
<span class="ruby-comment cmt"># File lib/core/facets/proc/to_method.rb, line 11</span>
|
566
478
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_method</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>)
|