kyanite 0.3.7 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/0_rake_test.bat +12 -0
- data/1_rake_install_gem.bat +20 -0
- data/3_rake_deploy.bat +4 -0
- data/4_ruby_script_console.bat +12 -0
- data/Div +23 -0
- data/History.txt +4 -2
- data/License.txt +21 -2
- data/Manifest.txt +46 -29
- data/README.txt +26 -33
- data/Rakefile.rb +6 -6
- data/config/website.yml +2 -0
- data/lib/kyanite.rb +46 -2
- data/lib/kyanite/array/array.rb +15 -14
- data/lib/kyanite/array/array2.rb +1 -1
- data/lib/kyanite/dictionary.rb +17 -2
- data/lib/kyanite/enumerable/enumerable_enumerables.rb +19 -9
- data/lib/kyanite/enumerable/enumerable_numerics.rb +25 -19
- data/lib/kyanite/enumerable/enumerable_strings.rb +14 -6
- data/lib/kyanite/enumerable/structure.rb +45 -29
- data/lib/kyanite/general/callerutils.rb +9 -1
- data/lib/kyanite/general/classutils.rb +59 -78
- data/lib/kyanite/general/kernel.rb +21 -3
- data/lib/kyanite/general/nil.rb +34 -12
- data/lib/kyanite/general/object.rb +25 -3
- data/lib/kyanite/general/true_false.rb +28 -10
- data/lib/kyanite/general/undoable.rb +24 -0
- data/lib/kyanite/hash.rb +43 -28
- data/lib/kyanite/numeric/float.rb +12 -5
- data/lib/kyanite/numeric/integer.rb +16 -9
- data/lib/kyanite/numeric/numeric.rb +19 -11
- data/lib/kyanite/operation/regexp.rb +5 -1
- data/lib/kyanite/optimizer.rb +31 -16
- data/lib/kyanite/range.rb +15 -8
- data/lib/kyanite/set.rb +35 -6
- data/lib/kyanite/string/cast.rb +18 -7
- data/lib/kyanite/string/chars.rb +24 -17
- data/lib/kyanite/string/diff.rb +14 -5
- data/lib/kyanite/string/div.rb +8 -1
- data/lib/kyanite/string/include.rb +13 -5
- data/lib/kyanite/string/list.rb +3 -3
- data/lib/kyanite/string/mgsub.rb +6 -2
- data/lib/kyanite/string/nested.rb +22 -3
- data/lib/kyanite/string/random.rb +4 -0
- data/lib/kyanite/string/split.rb +15 -7
- data/lib/kyanite/symbol.rb +14 -0
- data/lib/kyanite/tree.rb +10 -4
- data/script/console +10 -0
- data/script/console.cmd +1 -0
- data/script/destroy +14 -0
- data/script/destroy.cmd +1 -0
- data/script/generate +14 -0
- data/script/generate.cmd +1 -0
- data/script/txt2html +82 -0
- data/script/txt2html.cmd +1 -0
- data/tasks/deployment.rake +92 -0
- data/tasks/documentation.rake +28 -0
- data/tasks/environment.rake +7 -0
- data/test/array/test_matrix2.rb +1 -0
- data/test/enumerable/test_enumerable_numerics.rb +3 -2
- data/test/general/test_classutils.rb +3 -0
- data/test/general/test_nil.rb +1 -0
- data/test/general/test_object.rb +2 -1
- data/test/general/test_true_false.rb +1 -0
- data/test/numeric/test_numeric_integer.rb +2 -0
- data/test/string/test_cast.rb +4 -0
- data/test/string/test_chars.rb +3 -0
- data/test/string/test_diff.rb +3 -0
- data/test/string/test_list.rb +2 -0
- data/test/string/test_nested.rb +2 -0
- data/test/string/test_split.rb +3 -0
- data/test/test_dictionary.rb +3 -0
- data/test/test_hash.rb +2 -0
- data/test/test_optimizer.rb +14 -14
- data/test/test_range.rb +1 -0
- data/test/test_tree.rb +1 -1
- metadata +48 -31
data/0_rake_test.bat
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
@echo off
|
3
|
+
set MYDIR=F:\R\_Eigene_Projekte_unter_SVN\kyanite
|
4
|
+
@cmd /C chcp 1252 > NUL
|
5
|
+
set RUBYOPT=-rubygems
|
6
|
+
echo.
|
7
|
+
|
8
|
+
rem Manifest.txt aktualisieren
|
9
|
+
call rake check_manifest | patch
|
10
|
+
|
11
|
+
rem Windows native
|
12
|
+
call rake install_gem_no_doc
|
13
|
+
wait 3
|
14
|
+
|
15
|
+
rem Cygwin
|
16
|
+
C:\cygwin\bin\bash --login -c "cd $MYDIR; rake install_gem_no_doc"
|
17
|
+
wait 5
|
18
|
+
|
19
|
+
|
20
|
+
rem C:\cygwin\bin\bash --login -c "cd $MYDIR && echo 'Now in' `pwd`; sleep 15"
|
data/3_rake_deploy.bat
ADDED
data/Div
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
[ | *Kyanite* | Object | Array | Set | Enumerable | Hash | ] | Kyanite | TrueClass | FalseClass | NilClass | *Div* |
|
3
|
+
[ ] | *Div* | Tree::TreeNode | Optimizer |
|
4
|
+
---
|
5
|
+
|
6
|
+
== *Div*
|
7
|
+
* Tree::TreeNode Ergänzungen zu rubytree
|
8
|
+
* Optimizer Auswahl von Objekten auf Basis von Scores
|
9
|
+
* Undoable Undo für komplexe Objekte
|
10
|
+
|
11
|
+
|
12
|
+
== *Rake*
|
13
|
+
Beispiele siehe Rakefile.rb
|
14
|
+
* Methode remove_task, um Tasks überschreiben zu können
|
15
|
+
* Tasks werden beim Auflisten nach Namespace gruppiert, nicht verwendete Tasks lassen sich ausblenden,
|
16
|
+
* neuer Rake Task sleep_5
|
17
|
+
|
18
|
+
|
19
|
+
== *Unit* *Tests*
|
20
|
+
Die Klasse UnitTest enthält Ergänzungen zu Test::Unit::TestCase:
|
21
|
+
* Statusanzeige für durchlaufende Tests
|
22
|
+
* KKernel#smart_load_path vereinfacht die require-Statements in den Tests. Wird in allen Kyanite-Tests angewendet, Verwendung siehe dort.
|
23
|
+
|
data/History.txt
CHANGED
data/License.txt
CHANGED
@@ -1,5 +1,24 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
|
2
|
+
== License For Kyanite
|
3
|
+
Creative Commons Attribution-Share Alike 3.0 Germany
|
4
|
+
|
5
|
+
(cc-by-sa) http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
|
6
|
+
|
7
|
+
AUTOR: Björn Klippstein
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
10
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
11
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
12
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
13
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
14
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
15
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
== License For ActiveSupport Methods
|
20
|
+
|
21
|
+
Copyright (c) 2005 David Heinemeier Hansson
|
3
22
|
|
4
23
|
Permission is hereby granted, free of charge, to any person obtaining
|
5
24
|
a copy of this software and associated documentation files (the
|
data/Manifest.txt
CHANGED
@@ -1,11 +1,31 @@
|
|
1
|
+
0_rake_test.bat
|
2
|
+
1_rake_install_gem.bat
|
3
|
+
3_rake_deploy.bat
|
4
|
+
4_ruby_script_console.bat
|
5
|
+
Div
|
6
|
+
History.txt
|
7
|
+
License.txt
|
8
|
+
Manifest.txt
|
9
|
+
README.txt
|
10
|
+
Rakefile.rb
|
11
|
+
config/website.yml
|
12
|
+
init.rb
|
1
13
|
lib/kyanite.rb
|
2
|
-
lib/kyanite/array
|
14
|
+
lib/kyanite/array.rb
|
3
15
|
lib/kyanite/array/array.rb
|
16
|
+
lib/kyanite/array/array2.rb
|
4
17
|
lib/kyanite/array/matrix2.rb
|
18
|
+
lib/kyanite/array_of_enumerables.rb
|
19
|
+
lib/kyanite/array_of_numerics.rb
|
20
|
+
lib/kyanite/array_of_strings.rb
|
21
|
+
lib/kyanite/basics.rb
|
22
|
+
lib/kyanite/dictionary.rb
|
23
|
+
lib/kyanite/enumerable.rb
|
5
24
|
lib/kyanite/enumerable/enumerable_enumerables.rb
|
6
25
|
lib/kyanite/enumerable/enumerable_numerics.rb
|
7
26
|
lib/kyanite/enumerable/enumerable_strings.rb
|
8
27
|
lib/kyanite/enumerable/structure.rb
|
28
|
+
lib/kyanite/general.rb
|
9
29
|
lib/kyanite/general/callerutils.rb
|
10
30
|
lib/kyanite/general/classutils.rb
|
11
31
|
lib/kyanite/general/kernel.rb
|
@@ -13,13 +33,24 @@ lib/kyanite/general/nil.rb
|
|
13
33
|
lib/kyanite/general/object.rb
|
14
34
|
lib/kyanite/general/true_false.rb
|
15
35
|
lib/kyanite/general/undoable.rb
|
36
|
+
lib/kyanite/hash.rb
|
37
|
+
lib/kyanite/matrix2.rb
|
38
|
+
lib/kyanite/nil.rb
|
39
|
+
lib/kyanite/numeric.rb
|
16
40
|
lib/kyanite/numeric/float.rb
|
17
41
|
lib/kyanite/numeric/integer.rb
|
18
42
|
lib/kyanite/numeric/numeric.rb
|
43
|
+
lib/kyanite/operation.rb
|
19
44
|
lib/kyanite/operation/call_tracker.rb
|
20
45
|
lib/kyanite/operation/rake.rb
|
21
|
-
lib/kyanite/operation/unit_test.rb
|
22
46
|
lib/kyanite/operation/regexp.rb
|
47
|
+
lib/kyanite/operation/unit_test.rb
|
48
|
+
lib/kyanite/optimizer.rb
|
49
|
+
lib/kyanite/rake.rb
|
50
|
+
lib/kyanite/range.rb
|
51
|
+
lib/kyanite/set.rb
|
52
|
+
lib/kyanite/smart_load_path.rb
|
53
|
+
lib/kyanite/string.rb
|
23
54
|
lib/kyanite/string/cast.rb
|
24
55
|
lib/kyanite/string/chars.rb
|
25
56
|
lib/kyanite/string/chars_const.rb
|
@@ -31,35 +62,22 @@ lib/kyanite/string/mgsub.rb
|
|
31
62
|
lib/kyanite/string/nested.rb
|
32
63
|
lib/kyanite/string/random.rb
|
33
64
|
lib/kyanite/string/split.rb
|
34
|
-
lib/kyanite/array.rb
|
35
|
-
lib/kyanite/array_of_enumerables.rb
|
36
|
-
lib/kyanite/array_of_numerics.rb
|
37
|
-
lib/kyanite/array_of_strings.rb
|
38
|
-
lib/kyanite/basics.rb
|
39
|
-
lib/kyanite/dictionary.rb
|
40
|
-
lib/kyanite/enumerable.rb
|
41
|
-
lib/kyanite/general.rb
|
42
|
-
lib/kyanite/hash.rb
|
43
|
-
lib/kyanite/matrix2.rb
|
44
|
-
lib/kyanite/nil.rb
|
45
|
-
lib/kyanite/numeric.rb
|
46
|
-
lib/kyanite/operation.rb
|
47
|
-
lib/kyanite/optimizer.rb
|
48
|
-
lib/kyanite/rake.rb
|
49
|
-
lib/kyanite/range.rb
|
50
|
-
lib/kyanite/set.rb
|
51
|
-
lib/kyanite/smart_load_path.rb
|
52
|
-
lib/kyanite/string.rb
|
53
65
|
lib/kyanite/symbol.rb
|
54
66
|
lib/kyanite/tree.rb
|
55
67
|
lib/kyanite/undoable.rb
|
56
68
|
lib/kyanite/unit_test.rb
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
69
|
+
script/console
|
70
|
+
script/console.cmd
|
71
|
+
script/destroy
|
72
|
+
script/destroy.cmd
|
73
|
+
script/generate
|
74
|
+
script/generate.cmd
|
75
|
+
script/txt2html
|
76
|
+
script/txt2html.cmd
|
77
|
+
tasks/deployment.rake
|
78
|
+
tasks/documentation.rake
|
79
|
+
tasks/environment.rake
|
80
|
+
test/_start_all.rb
|
63
81
|
test/array/test_array.rb
|
64
82
|
test/array/test_matrix2.rb
|
65
83
|
test/enumerable/test_enumerable_enumerables.rb
|
@@ -77,10 +95,9 @@ test/string/test_diff.rb
|
|
77
95
|
test/string/test_list.rb
|
78
96
|
test/string/test_nested.rb
|
79
97
|
test/string/test_split.rb
|
80
|
-
test/_start_all.rb
|
81
98
|
test/test_dictionary.rb
|
82
99
|
test/test_hash.rb
|
83
100
|
test/test_optimizer.rb
|
84
101
|
test/test_range.rb
|
85
102
|
test/test_set.rb
|
86
|
-
test/test_tree.rb
|
103
|
+
test/test_tree.rb
|
data/README.txt
CHANGED
@@ -1,48 +1,41 @@
|
|
1
|
-
= Kyanite
|
2
1
|
|
3
|
-
*
|
2
|
+
= *Kyanite*
|
4
3
|
|
5
|
-
|
4
|
+
[ | *Kyanite* | Object | Array | Set | Enumerable | Hash | ] | *Kyanite* | TrueClass | FalseClass | NilClass | Div |
|
5
|
+
---
|
6
6
|
|
7
|
-
Kyanite is a general toolbox like Facets or ActiveSupport.
|
8
|
-
|
9
|
-
== FEATURES/PROBLEMS:
|
10
|
-
|
11
|
-
* FIX (list of features or problems)
|
12
7
|
|
13
|
-
==
|
14
|
-
|
15
|
-
|
8
|
+
== Features
|
9
|
+
Kyanite is a general toolbox like Facets or ActiveSupport.
|
10
|
+
* Transparent nil Handling, see NilClass
|
16
11
|
|
17
|
-
== REQUIREMENTS:
|
18
12
|
|
19
|
-
|
13
|
+
== Usage
|
14
|
+
require 'kyanite' # require all
|
15
|
+
require 'kyanite/basics' # require basic Kyanite behavior and features
|
16
|
+
require 'kyanite/string' # require all String related stuff
|
17
|
+
require 'kyanite/string/diff' # require all String#diff related stuff
|
20
18
|
|
21
|
-
== INSTALL:
|
22
19
|
|
23
|
-
|
20
|
+
== License
|
21
|
+
[ ] cc-by-sa
|
22
|
+
[ ] Creative Commons Attribution-Share Alike 3.0 Germany
|
23
|
+
[ ] http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
|
24
24
|
|
25
|
-
== LICENSE:
|
26
25
|
|
27
|
-
|
26
|
+
== Homepage
|
27
|
+
[ ] http://kyanite.rubyforge.org
|
28
28
|
|
29
|
-
Copyright (c) 2008 FIXME full name
|
30
29
|
|
31
|
-
|
32
|
-
|
33
|
-
'Software'), to deal in the Software without restriction, including
|
34
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
35
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
36
|
-
permit persons to whom the Software is furnished to do so, subject to
|
37
|
-
the following conditions:
|
30
|
+
== Author
|
31
|
+
[ ] Björn Klippstein
|
38
32
|
|
39
|
-
The above copyright notice and this permission notice shall be
|
40
|
-
included in all copies or substantial portions of the Software.
|
41
33
|
|
42
|
-
|
34
|
+
== Disclaimer
|
35
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
43
36
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
44
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
45
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
46
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
47
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
48
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
37
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
38
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
39
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
40
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
41
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile.rb
CHANGED
@@ -27,7 +27,7 @@ $hoe = Hoe.new('kyanite', Kyanite::VERSION) do |p|
|
|
27
27
|
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
28
28
|
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
29
29
|
|
30
|
-
p.rsync_args = "-av --delete"
|
30
|
+
p.rsync_args = "-av --delete --exclude=statsvn/"
|
31
31
|
end
|
32
32
|
|
33
33
|
|
@@ -37,11 +37,11 @@ end
|
|
37
37
|
# Kyanite
|
38
38
|
#
|
39
39
|
|
40
|
-
$rake_tasks_ausblenden = %w{ bundles:tm deps:email deps:fetch deps:list manifest manifest:refresh
|
41
|
-
announce clobber clobber_docs clobber_package clobber_rdoc
|
42
|
-
config_hoe debug_gem gem gemspec generate_key install_gem install_gem_no_doc
|
43
|
-
local_deploy package repackage post_blog ridocs
|
44
|
-
rdoc redocs rerdoc
|
40
|
+
$rake_tasks_ausblenden = %w{ audit bundles:tm deps:email deps:fetch deps:list manifest manifest:refresh
|
41
|
+
announce clobber clobber_docs clobber_package clobber_rdoc check_manifest
|
42
|
+
config_hoe debug_gem email features gem gemspec generate_key install_gem install_gem_no_doc
|
43
|
+
local_deploy multi package repackage post_blog ridocs
|
44
|
+
rdoc redocs rerdoc release
|
45
45
|
website website_generate website_upload }
|
46
46
|
require 'kyanite/rake'
|
47
47
|
|
data/config/website.yml
ADDED
data/lib/kyanite.rb
CHANGED
@@ -12,8 +12,52 @@ else
|
|
12
12
|
end
|
13
13
|
|
14
14
|
|
15
|
+
|
16
|
+
# = *Kyanite*
|
17
|
+
#
|
18
|
+
# [ | *Kyanite* | Object | Array | Set | Enumerable | Hash | ] | *Kyanite* | TrueClass | FalseClass | NilClass | Div |
|
19
|
+
# ---
|
20
|
+
#
|
21
|
+
#
|
22
|
+
# == Features
|
23
|
+
# Kyanite is a general toolbox like Facets or ActiveSupport.
|
24
|
+
# * Transparent nil Handling, see NilClass
|
25
|
+
# * Beautiful Rake, see Div
|
26
|
+
# * Comfortable UnitTests, see Div
|
27
|
+
#
|
28
|
+
#
|
29
|
+
# == Usage
|
30
|
+
# require 'kyanite' # require all
|
31
|
+
# require 'kyanite/basics' # require basic Kyanite behavior and features
|
32
|
+
# require 'kyanite/string' # require all String related stuff
|
33
|
+
# require 'kyanite/string/diff' # require all String#diff related stuff
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# == License
|
37
|
+
# [ ] cc-by-sa
|
38
|
+
# [ ] Creative Commons Attribution-Share Alike 3.0 Germany
|
39
|
+
# [ ] http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
|
40
|
+
#
|
41
|
+
#
|
42
|
+
# == Homepage
|
43
|
+
# [ ] http://kyanite.rubyforge.org
|
44
|
+
#
|
45
|
+
#
|
46
|
+
# == Author
|
47
|
+
# [ ] Björn Klippstein
|
48
|
+
#
|
49
|
+
#
|
50
|
+
# == Disclaimer
|
51
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
52
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
53
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
54
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
55
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
56
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
57
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
58
|
+
#
|
15
59
|
module Kyanite
|
16
|
-
VERSION
|
60
|
+
VERSION = '0.4.0'
|
17
61
|
end
|
18
62
|
|
19
63
|
|
@@ -33,4 +77,4 @@ end
|
|
33
77
|
require 'kyanite/string'
|
34
78
|
require 'kyanite/symbol'
|
35
79
|
require 'kyanite/tree'
|
36
|
-
# require 'kyanite/unit_test' # nur
|
80
|
+
# require 'kyanite/unit_test' # nur für Tests
|
data/lib/kyanite/array/array.rb
CHANGED
@@ -9,21 +9,22 @@ require 'kyanite/general/object' # Methode respond
|
|
9
9
|
require 'kyanite/general/classutils' # <=> für Class
|
10
10
|
require 'kyanite/symbol' # size
|
11
11
|
|
12
|
-
|
13
|
-
#
|
12
|
+
# [ | Kyanite | Object | *Array* | Set | Enumerable | Hash | ] | *Array* | ArrayOfNumerics | ArrayOfStrings | ArrayOfEnumerables | Range |
|
13
|
+
# ---
|
14
14
|
#
|
15
|
-
#
|
15
|
+
# == *Tools* *And* *Casts* *For* *Array*
|
16
|
+
# [ ] See TestKyaniteArray for tests and examples.
|
16
17
|
#
|
17
|
-
# Aus {Facets/Array}[http://facets.rubyforge.org/doc/api/core/classes/Array.html] eingefügt:
|
18
|
-
# * *delete_unless* <tt>(&block)</tt> Ergänzung zum regulären +delete_if+
|
19
|
-
# * *delete_values* <tt>(*values)</tt> Findet und löscht bestimmte Werte
|
20
|
-
# * *delete_values_at* <tt>(*selectors)</tt> Löscht Elemente an bestimmten Positionen
|
21
18
|
#
|
22
|
-
#
|
23
|
-
# *
|
24
|
-
# *
|
25
|
-
# *
|
26
|
-
#
|
19
|
+
# Aus {Facets/Array}[http://facets.rubyforge.org/doc/api/core/classes/Array.html] eingefügt:
|
20
|
+
# [*delete_unless* (&block)] Ergänzung zum regulären +delete_if+
|
21
|
+
# [*delete_values* (*values)] Findet und löscht bestimmte Werte
|
22
|
+
# [*delete_values_at* (*selectors)] Löscht Elemente an bestimmten Positionen
|
23
|
+
# [ ] .
|
24
|
+
# [*rotate* (n=1)] Alles rückt n Positionen auf
|
25
|
+
# [<b>select!</b> { |obj| block }] Wie +select+, aber modifiziert das Objekt
|
26
|
+
# [*to_h* (arrayed=nil)] Converts a two-element associative array into a hash.
|
27
|
+
# [*to_hash* ()] (Unterschied zu +to_h+ ???)
|
27
28
|
#
|
28
29
|
class Array
|
29
30
|
|
@@ -34,7 +35,7 @@ class Array
|
|
34
35
|
# [1,2,3].shift_complement.shift_complement => 3
|
35
36
|
# [1,2,3].shift_complement.shift_complement.shift_complement => nil
|
36
37
|
#
|
37
|
-
# Tests
|
38
|
+
# Tests and examples see TestKyaniteArray#test_array_shift_complement
|
38
39
|
#
|
39
40
|
def shift_complement
|
40
41
|
if self.size > 2
|
@@ -55,7 +56,7 @@ class Array
|
|
55
56
|
#
|
56
57
|
# Liefert eine Integerzahl.
|
57
58
|
#
|
58
|
-
# Tests
|
59
|
+
# Tests and examples see TestKyaniteArray#test_rephrase_index
|
59
60
|
#
|
60
61
|
def rephrase_index(i, style=:inv)
|
61
62
|
return i if i > (size-1)
|