kyanite 0.5.0 → 0.5.1

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.
Files changed (65) hide show
  1. data/Div +1 -7
  2. data/History.txt +3 -0
  3. data/Manifest.txt +0 -5
  4. data/README.txt +6 -6
  5. data/Rakefile.rb +27 -34
  6. data/lib/kyanite/array/array.rb +2 -9
  7. data/lib/kyanite/array/array2.rb +5 -5
  8. data/lib/kyanite/array/matrix2.rb +13 -13
  9. data/lib/kyanite/array.rb +1 -0
  10. data/lib/kyanite/array_of_enumerables.rb +1 -1
  11. data/lib/kyanite/array_of_numerics.rb +1 -1
  12. data/lib/kyanite/array_of_strings.rb +1 -1
  13. data/lib/kyanite/basics.rb +1 -2
  14. data/lib/kyanite/dictionary.rb +4 -4
  15. data/lib/kyanite/enumerable/enumerable_enumerables.rb +5 -5
  16. data/lib/kyanite/enumerable/enumerable_numerics.rb +4 -4
  17. data/lib/kyanite/enumerable/enumerable_strings.rb +6 -5
  18. data/lib/kyanite/enumerable/structure.rb +28 -25
  19. data/lib/kyanite/enumerable.rb +1 -1
  20. data/lib/kyanite/general/callerutils.rb +1 -1
  21. data/lib/kyanite/general/classutils.rb +23 -24
  22. data/lib/kyanite/general/kernel.rb +6 -6
  23. data/lib/kyanite/general/nil.rb +4 -4
  24. data/lib/kyanite/general/object.rb +1 -1
  25. data/lib/kyanite/general/true_false.rb +1 -1
  26. data/lib/kyanite/general/undoable.rb +7 -7
  27. data/lib/kyanite/general.rb +1 -1
  28. data/lib/kyanite/hash.rb +22 -22
  29. data/lib/kyanite/matrix2.rb +1 -1
  30. data/lib/kyanite/nil.rb +1 -1
  31. data/lib/kyanite/numeric/float.rb +1 -1
  32. data/lib/kyanite/numeric/integer.rb +7 -7
  33. data/lib/kyanite/numeric/numeric.rb +9 -9
  34. data/lib/kyanite/numeric.rb +1 -1
  35. data/lib/kyanite/operation/call_tracker.rb +1 -1
  36. data/lib/kyanite/operation/regexp.rb +1 -1
  37. data/lib/kyanite/operation/unit_test.rb +1 -1
  38. data/lib/kyanite/operation.rb +1 -1
  39. data/lib/kyanite/optimizer.rb +4 -4
  40. data/lib/kyanite/rake.rb +1 -1
  41. data/lib/kyanite/range.rb +4 -4
  42. data/lib/kyanite/set.rb +4 -6
  43. data/lib/kyanite/string/cast.rb +4 -4
  44. data/lib/kyanite/string/chars.rb +5 -5
  45. data/lib/kyanite/string/diff.rb +1 -1
  46. data/lib/kyanite/string/div.rb +1 -1
  47. data/lib/kyanite/string/include.rb +6 -6
  48. data/lib/kyanite/string/list.rb +1 -1
  49. data/lib/kyanite/string/nested.rb +1 -1
  50. data/lib/kyanite/string/split.rb +3 -3
  51. data/lib/kyanite/string.rb +1 -1
  52. data/lib/kyanite/symbol.rb +1 -1
  53. data/lib/kyanite/tree.rb +1 -1
  54. data/lib/kyanite/undoable.rb +1 -1
  55. data/lib/kyanite/unit_test.rb +1 -1
  56. data/lib/kyanite.rb +6 -6
  57. data/test/string/test_list.rb +2 -1
  58. data/test/test_hash.rb +1 -1
  59. data/test/test_range.rb +2 -1
  60. metadata +3 -8
  61. data/0_rake_test.bat +0 -13
  62. data/1_rake_install_gem.bat +0 -20
  63. data/3_rake_deploy.bat +0 -4
  64. data/4_ruby_script_console.bat +0 -13
  65. data/lib/kyanite/operation/rake.rb +0 -119
data/Div CHANGED
@@ -1,3 +1,4 @@
1
+ # ruby encoding: utf-8
1
2
 
2
3
  [ | *Kyanite* | Object | Array | Set | Enumerable | Hash | ] | Kyanite | TrueClass | FalseClass | NilClass | *Div* |
3
4
  [ ] | *Div* | Tree::TreeNode | Optimizer |
@@ -9,13 +10,6 @@
9
10
  * Undoable Undo für komplexe Objekte
10
11
 
11
12
 
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
13
  == *Unit* *Tests*
20
14
  Die Klasse UnitTest enthält Ergänzungen zu Test::Unit::TestCase:
21
15
  * Statusanzeige für durchlaufende Tests
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.5.1 2012-10-08
2
+ * improved documentation
3
+
1
4
  == 0.5.0 2012-10-07
2
5
  * now works with Ruby 1.9.x
3
6
 
data/Manifest.txt CHANGED
@@ -1,7 +1,3 @@
1
- 0_rake_test.bat
2
- 1_rake_install_gem.bat
3
- 3_rake_deploy.bat
4
- 4_ruby_script_console.bat
5
1
  Div
6
2
  History.txt
7
3
  License.txt
@@ -42,7 +38,6 @@ lib/kyanite/numeric/integer.rb
42
38
  lib/kyanite/numeric/numeric.rb
43
39
  lib/kyanite/operation.rb
44
40
  lib/kyanite/operation/call_tracker.rb
45
- lib/kyanite/operation/rake.rb
46
41
  lib/kyanite/operation/regexp.rb
47
42
  lib/kyanite/operation/unit_test.rb
48
43
  lib/kyanite/optimizer.rb
data/README.txt CHANGED
@@ -1,3 +1,4 @@
1
+ # ruby encoding: utf-8
1
2
 
2
3
  = *Kyanite*
3
4
 
@@ -10,7 +11,6 @@ http://kyanite.rubyforge.org
10
11
  == Features
11
12
  Kyanite is a general toolbox like Facets or ActiveSupport.
12
13
  * Transparent nil Handling, see NilClass
13
- * Beautiful Rake, see Div
14
14
  * Comfortable UnitTests, see Div
15
15
 
16
16
 
@@ -22,17 +22,17 @@ Kyanite is a general toolbox like Facets or ActiveSupport.
22
22
 
23
23
 
24
24
  == License
25
- [ ] cc-by-sa
26
- [ ] Creative Commons Attribution-Share Alike 3.0 Germany
27
- [ ] http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
25
+ cc-by-sa
26
+ Creative Commons Attribution-Share Alike 3.0 Germany
27
+ http://creativecommons.org/licenses/by-sa/3.0/de/deed.en
28
28
 
29
29
 
30
30
  == Homepage
31
- [ ] http://kyanite.rubyforge.org
31
+ http://kyanite.rubyforge.org
32
32
 
33
33
 
34
34
  == Author
35
- [ ] Björn Klippstein
35
+ Björn Klippstein
36
36
 
37
37
 
38
38
  == Disclaimer
data/Rakefile.rb CHANGED
@@ -1,65 +1,58 @@
1
-
2
- # ----------------------------------------------------------------------------------------------
3
- # Deploy
4
- #
1
+ # ruby encoding: utf-8
5
2
 
6
3
  require 'rubygems'
7
4
  require 'hoe'
8
- require File.dirname(__FILE__) + '/lib/kyanite'
9
- # %w[rubygems rake rake/clean fileutils].each { |f| require f }
5
+ require 'rake'
6
+ # require File.dirname(__FILE__) + '/lib/kyanite'
7
+ # require 'kyanite/rake'
10
8
 
11
9
 
10
+
11
+ # ----------------------------------------------------------------------------------------------
12
+ # Deploy
13
+ #
14
+ # http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe
15
+ #
12
16
  $hoe = Hoe.spec 'kyanite' do | p |
13
17
 
14
18
  # self.rubyforge_name = 'yourgemx' # if different than 'yourgem'
15
19
 
16
20
  p.developer('Bjoern Klippstein', 'klippstein@klippstein.com')
21
+ p.summary = 'General toolbox like Facets or ActiveSupport.'
22
+ p.url = 'http://kyanite.rubyforge.org'
17
23
  p.remote_rdoc_dir = '' # Release to root only one project
18
24
  p.extra_deps = [ ['activesupport', '>= 3.2.8'],
19
25
  ['facets', '>= 2.9.3'],
20
26
  ['rubytree', '>= 0.8.3'] ]
21
-
22
- # p.author = 'Bjoern Klippstein'
23
- # p.email = 'bjoernklippstein@gmail.com'
24
- # p.url = 'http://rapidrubyonrails.de'
25
- # p.url = 'http://kyanite.rubyforge.org'
26
-
27
- # p.rubyforge_name = p.name
28
- # p.summary = 'General toolbox like Facets or ActiveSupport.'
29
- # p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
30
- # p.clean_globs |= %w[**/.DS_Store tmp *.log]
31
- # path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
32
- # p.rsync_args = "-av --delete --exclude=statsvn/"
27
+
33
28
  end
34
29
 
35
30
 
36
31
 
37
32
 
38
33
  # ----------------------------------------------------------------------------------------------
39
- # Kyanite
34
+ # Local Tasks
40
35
  #
41
36
 
42
- # $rake_tasks_ausblenden = %w{ audit bundles:tm deps:email deps:fetch deps:list manifest manifest:refresh
43
- # announce clobber clobber_docs clobber_package clobber_rdoc check_manifest
44
- # config_hoe debug_gem email features gem gemspec generate_key install_gem install_gem_no_doc
45
- # local_deploy multi package repackage post_blog ridocs
46
- # rdoc redocs rerdoc release
47
- # website website_generate website_upload }
48
- # require 'kyanite/rake'
37
+ # remove_task 'release_to_gemcutter'
38
+ # remove_task 'ridocs'
39
+ # Dir['tasks/**/*.rake'].each { |t| load t }
40
+ # remove_task 'rdoc'
41
+ # remove_task 'docs'
42
+ # remove_task 'audit'
43
+ # remove_task 'dcov'
44
+ # remove_task 'debug_email'
45
+ # remove_task 'debug_gem'
46
+ # remove_task 'default'
47
+ # remove_task 'deps:email'
48
+ # remove_task 'multi'
49
+ # remove_task 'newb'
49
50
 
50
51
 
51
52
 
52
53
 
53
- # ----------------------------------------------------------------------------------------------
54
- # Local Tasks
55
- #
56
-
57
- # require 'newgem/tasks' # load /tasks/*.rake
58
- # Dir['tasks/**/*.rake'].each { |t| load t }
59
54
 
60
55
 
61
- # TODO - want other tests/tasks run by default? Add them to the list
62
- # task :default => [:spec, :features]
63
56
 
64
57
 
65
58
 
@@ -1,4 +1,4 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'facets/array/delete' # Methoden delete_unless, delete_values, delete_values_at
3
3
  require 'facets/array/rotate' # Methoden rotate, rotate!
4
4
  require 'facets/array/select' # Methode select!
@@ -15,7 +15,7 @@ require 'kyanite/symbol' # size
15
15
  # ---
16
16
  #
17
17
  # == *Tools* *And* *Casts* *For* *Array*
18
- # [ ] See TestKyaniteArray for tests and examples.
18
+ # See TestKyaniteArray for tests and examples.
19
19
  #
20
20
  #
21
21
  # Aus {Facets/Array}[http://facets.rubyforge.org/doc/api/core/classes/Array.html] eingefügt:
@@ -87,13 +87,6 @@ class Array
87
87
 
88
88
 
89
89
 
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
90
 
98
91
 
99
92
 
@@ -1,4 +1,4 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/array/array'
3
3
 
4
4
  class Array
@@ -18,7 +18,7 @@ class NilClass
18
18
  def row_to_nil; nil; end
19
19
  end
20
20
 
21
- # Ein Array2 ist eine spezielle Form von Array, n�mlich immer zweidimensional. Siehe auch Matrix2!
21
+ # Ein Array2 ist eine spezielle Form von Array, nämlich immer zweidimensional. Siehe auch Matrix2!
22
22
  #
23
23
  # Ein Array2 kann <b>in jeder Zeile eine verschiedene Anzahl Spalten </b> haben (im Gegensatz zu Instanzen der Klasse Matrix2!)
24
24
  # Jede Zeile hat einen Zeilenheader (Zelle 0), einen Spaltenheader gibt es nicht.
@@ -36,7 +36,7 @@ class Array2 < Array
36
36
  end
37
37
 
38
38
 
39
- # Liefert eine bestimmte Zeile zur�ck.
39
+ # Liefert eine bestimmte Zeile zurück.
40
40
  #
41
41
  # Tests: TestMatrix2#test_matrix_zellen_und_zeilen
42
42
  def row(i)
@@ -74,8 +74,8 @@ class Array2 < Array
74
74
 
75
75
 
76
76
  # Liefert eine bereinigte Kopie des Array2.
77
- # Level=0:: Platzhalter f�r den More-Link durch echten More-Link ersetzen
78
- # Level=1:: Zeilen ohne Zeilenheader werden gel�scht
77
+ # Level=0:: Platzhalter für den More-Link durch echten More-Link ersetzen
78
+ # Level=1:: Zeilen ohne Zeilenheader werden gelöscht
79
79
  #
80
80
  def clean4view(level = 0)
81
81
  new = self.collect { |zeile|
@@ -1,18 +1,18 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/array/array2'
3
3
 
4
- # Datenstruktur f�r streng-zweidimensionale Matritzen. Erbt die Methoden von Array2 und Array. Beispiele siehe TestMatrix2.
4
+ # Datenstruktur für streng-zweidimensionale Matritzen. Erbt die Methoden von Array2 und Array. Beispiele siehe TestMatrix2.
5
5
  #
6
6
  # Eine Matrix2 ist eine spezielle Form von Array2, sie hat <b>in jeder Zeile die gleiche Anzahl Spalten</b>.
7
7
  # Jede Zeile hat einen Zeilenheader row(0), jede Spalte einen Spaltenheader column(0).
8
8
  #
9
- # Man k�nnte auch die Standard-Library Matrix verwenden, aber die ist langsam, fehlerhaft und eher auf numerische Werte zugeschnitten denn auf beliebige Objekte.
9
+ # Man könnte auch die Standard-Library Matrix verwenden, aber die ist langsam, fehlerhaft und eher auf numerische Werte zugeschnitten denn auf beliebige Objekte.
10
10
  #
11
11
  # noch nicht implementiert: append!(top | bottom | left | right)
12
12
  class Matrix2 < Array2
13
13
 
14
- # Liefert eine bestimmte Spalte zur�ck.
15
- # Dabei wird die Matrix2 vorher mit clean4view!(0) behandelt, d.h. sie ver�ndert sich ggf.!
14
+ # Liefert eine bestimmte Spalte zurück.
15
+ # Dabei wird die Matrix2 vorher mit clean4view!(0) behandelt, d.h. sie verändert sich ggf.!
16
16
  #
17
17
  # Tests: TestMatrix2#test_spalten
18
18
  def column(j)
@@ -22,7 +22,7 @@ class Matrix2 < Array2
22
22
 
23
23
 
24
24
  # Setzt den Wert einer Spalte.
25
- # Dabei wird die Matrix2 vorher mit clean4view!(0) behandelt, d.h. sie ver�ndert sich ggf.!
25
+ # Dabei wird die Matrix2 vorher mit clean4view!(0) behandelt, d.h. sie verändert sich ggf.!
26
26
  #
27
27
  # Tests: TestMatrix2#test_spalten
28
28
  def set_column!(j,wert)
@@ -35,22 +35,22 @@ class Matrix2 < Array2
35
35
  return wertdup
36
36
  end
37
37
 
38
- # Wieviele Spalten hat die Tabelle? Ma�geblich daf�r ist die Header-Spalte!
38
+ # Wieviele Spalten hat die Tabelle? Maßgeblich dafür ist die Header-Spalte!
39
39
  def column_size
40
40
  self[0].size
41
41
  end
42
42
 
43
43
 
44
44
  # Liefert eine bereinigte Kopie der Matrix2.
45
- # Level=0:: Resize to Header, d.h. alle Zeilen werden auf die L�nge der ersten Zeile angepasst (beschnitten oder mit nil aufgef�llt)
46
- # Level=1:: Zeilen ohne Zeilenheader werden gel�scht
47
- # Level=2:: Spalten ohne Spaltenheader werden gel�scht
45
+ # Level=0:: Resize to Header, d.h. alle Zeilen werden auf die Länge der ersten Zeile angepasst (beschnitten oder mit nil aufgefüllt)
46
+ # Level=1:: Zeilen ohne Zeilenheader werden gelöscht
47
+ # Level=2:: Spalten ohne Spaltenheader werden gelöscht
48
48
  #
49
49
  # Test: TestMatrix2#test_resize_to_header
50
50
  #
51
51
  def clean4view(level = 0)
52
52
 
53
- # Level 0 : Resize to Header, d.h. alle Zeilen werden auf die L�nge der ersten Zeile angepasst (beschnitten oder mit nil aufgef�llt)
53
+ # Level 0 : Resize to Header, d.h. alle Zeilen werden auf die Länge der ersten Zeile angepasst (beschnitten oder mit nil aufgefüllt)
54
54
  cs = self.column_size
55
55
  new = self.collect { |zeile|
56
56
  zs = zeile.size
@@ -64,13 +64,13 @@ class Matrix2 < Array2
64
64
  return Matrix2.new(new) if level == 0 # Level 0
65
65
 
66
66
 
67
- #Level 1 : Zeilen ohne Zeilenheader werden gel�scht
67
+ #Level 1 : Zeilen ohne Zeilenheader werden gelöscht
68
68
  new.collect! { | zeile | zeile.row_to_nil }
69
69
  new.compact!
70
70
  return Matrix2.new(new) if level == 1 # Level 1
71
71
 
72
72
 
73
- # Level 2 : Spalten ohne Spaltenheader werden gel�scht
73
+ # Level 2 : Spalten ohne Spaltenheader werden gelöscht
74
74
  new.transpose!
75
75
  new.collect! { | spalte | spalte.row_to_nil }
76
76
  new.compact!
data/lib/kyanite/array.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # ruby encoding: utf-8
1
2
 
2
3
  require 'kyanite/array/matrix2' # das ist die oberste Ebene, array2 und array werden ebenfalls required
3
4
  require 'kyanite/enumerable/enumerable_enumerables'
@@ -1,2 +1,2 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/enumerable/enumerable_enumerables'
@@ -1,2 +1,2 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/enumerable/enumerable_numerics'
@@ -1,2 +1,2 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/enumerable/enumerable_strings'
@@ -1,7 +1,6 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  # Required eine Auswahl wichtiger Kyanite-Libs
3
3
 
4
- $KCODE = 'UTF8'
5
4
 
6
5
  # ----------------------------------------------------------------
7
6
  # innerhalb von Verzeichnissen
@@ -1,4 +1,4 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'hashery' # old: 'facets/dictionary'
3
3
  require 'kyanite/enumerable' # is_collection?
4
4
 
@@ -9,9 +9,9 @@ require 'kyanite/enumerable' # is_collection?
9
9
  #
10
10
  #
11
11
  # == *Tools* *For* *Facets* *Dictionary*
12
- # [ ] A Dictionary is a ordered Hash.
13
- # [ ] Expands {Facets/Dictionary}[http://facets.rubyforge.org/doc/api/more/classes/Dictionary.html].
14
- # [ ] See TestKyaniteDictionary for tests and examples.
12
+ # A Dictionary is a ordered Hash.
13
+ # Expands {Facets/Dictionary}[http://facets.rubyforge.org/doc/api/more/classes/Dictionary.html].
14
+ # See TestKyaniteDictionary for tests and examples.
15
15
  #
16
16
  #
17
17
  class Dictionary < Hashery::Dictionary
@@ -15,9 +15,9 @@ end
15
15
  #
16
16
  #
17
17
  # == *Enumeration* *Of* *Enumerations*
18
- # [ ] Für zweidimensionale Enumerables bzw. Aufzählungen von Objekten, die wiederum aufzählbar sind.
19
- # [ ] See TestKyaniteEnumerableEnumerables for tests and examples.
20
- # [ ] See ArrayOfEnumerables for an Array with modul EnumerableEnumerables included.
18
+ # Für zweidimensionale Enumerables bzw. Aufzählungen von Objekten, die wiederum aufzählbar sind.
19
+ # See TestKyaniteEnumerableEnumerables for tests and examples.
20
+ # See ArrayOfEnumerables for an Array with modul EnumerableEnumerables included.
21
21
  #
22
22
  #
23
23
  module EnumerableEnumerables
@@ -51,8 +51,8 @@ end
51
51
  #
52
52
  #
53
53
  # == *Array* *Of* *Enumerations*
54
- # [ ] An ArrayOfEnumerables is an Array with modul EnumerableEnumerables included.
55
- # [ ] See TestKyaniteEnumerableEnumerables for tests and examples.
54
+ # An ArrayOfEnumerables is an Array with modul EnumerableEnumerables included.
55
+ # See TestKyaniteEnumerableEnumerables for tests and examples.
56
56
  #
57
57
  class ArrayOfEnumerables < Array
58
58
  include EnumerableEnumerables
@@ -5,8 +5,8 @@
5
5
  #
6
6
  #
7
7
  # == *Enumeration* *Of* *Numerics*
8
- # [ ] See TestKyaniteEnumerableNumerics for tests and examples.
9
- # [ ] See ArrayOfNumerics for an Array with modul EnumerableNumerics included.
8
+ # See TestKyaniteEnumerableNumerics for tests and examples.
9
+ # See ArrayOfNumerics for an Array with modul EnumerableNumerics included.
10
10
  #
11
11
  #
12
12
  module EnumerableNumerics
@@ -119,8 +119,8 @@ end #class
119
119
  #
120
120
  #
121
121
  # == *Array* *Of* *Numerics*
122
- # [ ] An ArrayOfNumerics is an Array with modul EnumerableNumerics included.
123
- # [ ] See TestKyaniteEnumerableNumerics for tests and examples.
122
+ # An ArrayOfNumerics is an Array with modul EnumerableNumerics included.
123
+ # See TestKyaniteEnumerableNumerics for tests and examples.
124
124
  #
125
125
  class ArrayOfNumerics < Array
126
126
  include EnumerableNumerics
@@ -1,12 +1,13 @@
1
- # ruby encoding: utf-8
1
+ # ruby encoding: utf-8
2
+ # ü
2
3
 
3
4
  # [ | Kyanite | Object | Array | Set | *Enumerable* | Hash | ] | Enumerable | EnumerableNumerics | *EnumerableStrings* | EnumerableEnumerables |
4
5
  # ---
5
6
  #
6
7
  #
7
8
  # == *Enumeration* *Of* *Strings*
8
- # [ ] See TestKyaniteEnumerableStrings for tests and examples.
9
- # [ ] See ArrayOfStrings for an Array with modul EnumerableStrings included.
9
+ # See TestKyaniteEnumerableStrings for tests and examples.
10
+ # See ArrayOfStrings for an Array with modul EnumerableStrings included.
10
11
  #
11
12
  #
12
13
  module EnumerableStrings
@@ -42,8 +43,8 @@ end
42
43
  #
43
44
  #
44
45
  # == *Array* *Of* *Strings*
45
- # [ ] An ArrayOfstrings is an Array with modul EnumerableStrings included.
46
- # [ ] See TestKyaniteEnumerableStrings for tests and examples.
46
+ # An ArrayOfstrings is an Array with modul EnumerableStrings included.
47
+ # See TestKyaniteEnumerableStrings for tests and examples.
47
48
  #
48
49
  class ArrayOfStrings < Array
49
50
  include EnumerableStrings
@@ -1,15 +1,18 @@
1
1
  # ruby encoding: utf-8
2
+ require File.join(File.dirname(__FILE__), '..', '..', '..', 'smart_load_path.rb' ); smart_load_path if $0 == __FILE__
2
3
 
3
4
  require 'kyanite/general/object'
4
5
  require 'kyanite/array/array'
6
+ require 'kyanite/dictionary'
7
+
5
8
 
6
9
 
7
10
 
8
11
  class Object
9
12
 
10
- # [ ] Enthält ein Objekt mehrere Objekte?
11
- # [ ] String und Range gelten nicht als Collection.
12
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
13
+ # Enthält ein Objekt mehrere Objekte?
14
+ # String und Range gelten nicht als Collection.
15
+ # See TestKyaniteEnumerableStructure for tests and examples.
13
16
  def is_collection?; false; end
14
17
 
15
18
  end
@@ -17,10 +20,10 @@ end
17
20
 
18
21
  module Enumerable
19
22
 
20
- # [ ] Enthält ein Objekt mehrere Objekte?
21
- # [ ] Rückgabe: true
22
- # [ ] String und Range gelten nicht als Collection.
23
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
23
+ # Enthält ein Objekt mehrere Objekte?
24
+ # Rückgabe: true
25
+ # String und Range gelten nicht als Collection.
26
+ # See TestKyaniteEnumerableStructure for tests and examples.
24
27
  def is_collection?; true; end
25
28
 
26
29
  end
@@ -32,10 +35,10 @@ class String
32
35
  # :section: Structure
33
36
  #
34
37
 
35
- # [ ] Enthält ein Objekt mehrere Objekte?
36
- # [ ] Rückgabe: false
37
- # [ ] String und Range gelten nicht als Collection.
38
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
38
+ # Enthält ein Objekt mehrere Objekte?
39
+ # Rückgabe: false
40
+ # String und Range gelten nicht als Collection.
41
+ # See TestKyaniteEnumerableStructure for tests and examples.
39
42
  def is_collection?; false; end
40
43
 
41
44
 
@@ -44,10 +47,10 @@ end
44
47
 
45
48
  class Range
46
49
 
47
- # [ ] Enthält ein Objekt mehrere Objekte?
48
- # [ ] Rückgabe: false
49
- # [ ] String und Range gelten nicht als Collection.
50
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
50
+ # Enthält ein Objekt mehrere Objekte?
51
+ # Rückgabe: false
52
+ # String und Range gelten nicht als Collection.
53
+ # See TestKyaniteEnumerableStructure for tests and examples.
51
54
  def is_collection?; false; end
52
55
 
53
56
  end
@@ -63,16 +66,16 @@ end
63
66
  #
64
67
  #
65
68
  # == *General* *Enumerations*
66
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
69
+ # See TestKyaniteEnumerableStructure for tests and examples.
67
70
  #
68
71
  #
69
72
  module Enumerable
70
73
 
71
- # [ ] Liefert die Verteilung der size
72
- # [ ] oder die Verteilung der class
73
- # [ ] oder die Verteilung eines anderen Merkmals der aufgezählten Elemente.
74
- # [ ] die Methode gibt es auch als Hash#distribution.
75
- # [ ] See TestKyaniteEnumerableStructure for tests and examples.
74
+ # Liefert die Verteilung der size
75
+ # oder die Verteilung der class
76
+ # oder die Verteilung eines anderen Merkmals der aufgezählten Elemente.
77
+ # die Methode gibt es auch als Hash#distribution.
78
+ # See TestKyaniteEnumerableStructure for tests and examples.
76
79
  #
77
80
  def distribution( mode = :size)
78
81
  verteilung = Hash.new
@@ -135,7 +138,7 @@ module Enumerable
135
138
  end
136
139
 
137
140
  when :all
138
- unless ( self.kind_of?(Hash) || self.kind_of?(Dictionary) )
141
+ unless ( self.kind_of?(Hash) || self.kind_of?(Hashery::Dictionary) )
139
142
  c = self.collect {|e| e.class}
140
143
  else
141
144
  c = self.collect {| key, value | value.class}
@@ -174,14 +177,14 @@ end #module
174
177
  #
175
178
  if $0 == __FILE__
176
179
 
177
- require 'kyanite/smart_load_path'; smart_load_path
178
180
  class Array
179
181
  include Enumerable
180
182
  end
181
183
 
182
184
 
183
- test = [ ]
184
- see test.contentclass(:precision => :all)
185
+ test = [ 1,2,3]
186
+ puts "Hallo"
187
+ puts test.contentclass(:precision => :all)
185
188
 
186
189
 
187
190
 
@@ -1,4 +1,4 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/enumerable/enumerable_enumerables'
3
3
  require 'kyanite/enumerable/enumerable_numerics'
4
4
  require 'kyanite/enumerable/enumerable_strings'
@@ -1,4 +1,4 @@
1
-
1
+ # ruby encoding: utf-8
2
2
  require 'kyanite/string/include'
3
3
 
4
4