kyanite 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Div +6 -32
- data/{History.txt → History.rdoc} +8 -0
- data/{License.txt → License.rdoc} +0 -0
- data/Manifest.txt +6 -21
- data/README.rdoc +44 -0
- data/Rakefile.rb +19 -68
- data/console.rb +2 -4
- data/lib/kyanite.rb +151 -14
- data/lib/kyanite/array.rb +127 -4
- data/lib/kyanite/basics.rb +3 -7
- data/lib/kyanite/dictionary.rb +19 -21
- data/lib/kyanite/enumerable/enumerable_enumerables.rb +22 -24
- data/lib/kyanite/enumerable/enumerable_numerics.rb +51 -49
- data/lib/kyanite/enumerable/enumerable_strings.rb +18 -25
- data/lib/kyanite/enumerable/structure.rb +46 -58
- data/lib/kyanite/general/callerutils.rb +30 -28
- data/lib/kyanite/general/classutils.rb +73 -63
- data/lib/kyanite/general/kernel.rb +45 -64
- data/lib/kyanite/general/object.rb +22 -46
- data/lib/kyanite/general/true_false.rb +33 -27
- data/lib/kyanite/general/undoable.rb +12 -16
- data/lib/kyanite/hash.rb +63 -58
- data/lib/kyanite/numeric.rb +14 -1
- data/lib/kyanite/numeric/float.rb +32 -22
- data/lib/kyanite/numeric/integer.rb +12 -20
- data/lib/kyanite/optimizer.rb +41 -24
- data/lib/kyanite/range.rb +42 -22
- data/lib/kyanite/set.rb +56 -63
- data/lib/kyanite/string.rb +1 -2
- data/lib/kyanite/string/cast.rb +61 -37
- data/lib/kyanite/string/chars.rb +66 -36
- data/lib/kyanite/string/chars_const.rb +4 -3
- data/lib/kyanite/string/diff.rb +64 -34
- data/lib/kyanite/string/include.rb +16 -9
- data/lib/kyanite/string/list.rb +38 -8
- data/lib/kyanite/string/misc.rb +64 -0
- data/lib/kyanite/string/nested.rb +39 -22
- data/lib/kyanite/string/random.rb +117 -47
- data/lib/kyanite/string/split.rb +84 -45
- data/lib/kyanite/symbol.rb +30 -21
- data/lib/kyanite/tree.rb +33 -28
- data/test/_start_all.rb +18 -15
- data/test/array/test_array.rb +5 -7
- data/test/enumerable/test_enumerable_enumerables.rb +11 -15
- data/test/enumerable/test_enumerable_numerics.rb +50 -54
- data/test/enumerable/test_enumerable_strings.rb +8 -11
- data/test/enumerable/test_structure.rb +6 -8
- data/test/general/test_classutils.rb +9 -9
- data/test/general/test_object.rb +4 -5
- data/test/general/test_true_false.rb +4 -5
- data/test/numeric/test_numeric_integer.rb +6 -6
- data/test/string/test_cast.rb +4 -5
- data/test/string/test_chars.rb +6 -7
- data/test/string/test_diff.rb +4 -5
- data/test/string/test_list.rb +4 -5
- data/test/string/test_misc.rb +58 -0
- data/test/string/test_nested.rb +4 -5
- data/test/string/test_split.rb +10 -5
- data/test/test_dictionary.rb +4 -6
- data/test/test_hash.rb +5 -7
- data/test/test_optimizer.rb +4 -5
- data/test/test_range.rb +8 -9
- data/test/test_set.rb +7 -7
- data/test/test_tree.rb +7 -10
- data/version.rb +8 -0
- metadata +32 -33
- data/README.txt +0 -47
- data/lib/kyanite/array/array.rb +0 -140
- data/lib/kyanite/array/array2.rb +0 -142
- data/lib/kyanite/array/matrix2.rb +0 -120
- data/lib/kyanite/hoe.rb +0 -2
- data/lib/kyanite/matrix2.rb +0 -2
- data/lib/kyanite/numeric/numeric.rb +0 -54
- data/lib/kyanite/operation.rb +0 -5
- data/lib/kyanite/operation/call_tracker.rb +0 -69
- data/lib/kyanite/operation/hoe.rb +0 -12
- data/lib/kyanite/operation/rake.rb +0 -298
- data/lib/kyanite/operation/regexp.rb +0 -28
- data/lib/kyanite/operation/unit_test.rb +0 -50
- data/lib/kyanite/rake.rb +0 -2
- data/lib/kyanite/smart_load_path.rb +0 -6
- data/lib/kyanite/string/div.rb +0 -28
- data/lib/kyanite/string/mgsub.rb +0 -43
- data/lib/kyanite/unit_test.rb +0 -2
- data/test/array/test_matrix2.rb +0 -166
- data/test/string/test_mgsub.rb +0 -58
data/Div
CHANGED
@@ -10,38 +10,12 @@
|
|
10
10
|
* Undoable Undo für komplexe Objekte
|
11
11
|
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
smart_load_path
|
20
|
-
end
|
21
|
-
require 'kyanite/unit_test'
|
22
|
-
require 'my_library'
|
23
|
-
Das +require 'my_library'+ lädt die aktuelle Version von +my_library+ im übergeordneten Projektverzeichnis, nicht nur die über gem installierte Version.
|
24
|
-
|
25
|
-
|
26
|
-
== Rake Tasks
|
27
|
-
Usage: Head of Rakefile
|
28
|
-
projectname = File.dirname(__FILE__).split("/")[-1].strip # Name des Projekt-Stammverzeichnisses
|
29
|
-
require File.dirname(__FILE__) + "/lib/#{projectname}" # Hauptdatei der Library
|
30
|
-
|
31
|
-
Kyanite.projectname = projectname
|
32
|
-
Kyanite.github_username = 'bklippstein'
|
33
|
-
|
34
|
-
require 'hoe'
|
35
|
-
require 'rdoc/task'
|
36
|
-
require 'kyanite/rake'
|
37
|
-
|
38
|
-
|
39
|
-
Console:
|
40
|
-
rake rubygems_publish # release actual version to rubygems
|
41
|
-
rake git_publish # publish actual version to github
|
42
|
-
rake git_publish_docs # publish docs to github
|
43
|
-
|
44
|
-
rake publish # publish all to github and rubygems, reinstall gem
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
|
45
19
|
|
46
20
|
|
47
21
|
|
@@ -1,3 +1,11 @@
|
|
1
|
+
== 0.7.0 2012-10-31
|
2
|
+
* some structure changes
|
3
|
+
* englisch YARD documentation
|
4
|
+
|
5
|
+
== 0.6.2 2012-10-15
|
6
|
+
* $LOAD_PATH management and Rake tasks for deploying: now in gem drumherum
|
7
|
+
* Nil-Handling: now in gem transparent_nil
|
8
|
+
|
1
9
|
== 0.6.0 2012-10-15
|
2
10
|
* improved nil-Handling
|
3
11
|
|
File without changes
|
data/Manifest.txt
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
console.rb
|
2
2
|
Div
|
3
|
-
History.
|
4
|
-
License.
|
3
|
+
History.rdoc
|
4
|
+
License.rdoc
|
5
5
|
Manifest.txt
|
6
|
-
README.
|
6
|
+
README.rdoc
|
7
7
|
Rakefile.rb
|
8
8
|
init.rb
|
9
|
+
version.rb
|
9
10
|
lib/kyanite.rb
|
10
11
|
lib/kyanite/array.rb
|
11
|
-
lib/kyanite/array/array.rb
|
12
|
-
lib/kyanite/array/array2.rb
|
13
|
-
lib/kyanite/array/matrix2.rb
|
14
12
|
lib/kyanite/array_of_enumerables.rb
|
15
13
|
lib/kyanite/array_of_numerics.rb
|
16
14
|
lib/kyanite/array_of_strings.rb
|
@@ -29,42 +27,28 @@ lib/kyanite/general/object.rb
|
|
29
27
|
lib/kyanite/general/true_false.rb
|
30
28
|
lib/kyanite/general/undoable.rb
|
31
29
|
lib/kyanite/hash.rb
|
32
|
-
lib/kyanite/hoe.rb
|
33
|
-
lib/kyanite/matrix2.rb
|
34
30
|
lib/kyanite/numeric.rb
|
35
31
|
lib/kyanite/numeric/float.rb
|
36
32
|
lib/kyanite/numeric/integer.rb
|
37
|
-
lib/kyanite/numeric/numeric.rb
|
38
|
-
lib/kyanite/operation.rb
|
39
|
-
lib/kyanite/operation/call_tracker.rb
|
40
|
-
lib/kyanite/operation/hoe.rb
|
41
|
-
lib/kyanite/operation/rake.rb
|
42
|
-
lib/kyanite/operation/regexp.rb
|
43
|
-
lib/kyanite/operation/unit_test.rb
|
44
33
|
lib/kyanite/optimizer.rb
|
45
|
-
lib/kyanite/rake.rb
|
46
34
|
lib/kyanite/range.rb
|
47
35
|
lib/kyanite/set.rb
|
48
|
-
lib/kyanite/smart_load_path.rb
|
49
36
|
lib/kyanite/string.rb
|
50
37
|
lib/kyanite/string/cast.rb
|
51
38
|
lib/kyanite/string/chars.rb
|
52
39
|
lib/kyanite/string/chars_const.rb
|
53
40
|
lib/kyanite/string/diff.rb
|
54
|
-
lib/kyanite/string/div.rb
|
55
41
|
lib/kyanite/string/include.rb
|
56
42
|
lib/kyanite/string/list.rb
|
57
|
-
lib/kyanite/string/
|
43
|
+
lib/kyanite/string/misc.rb
|
58
44
|
lib/kyanite/string/nested.rb
|
59
45
|
lib/kyanite/string/random.rb
|
60
46
|
lib/kyanite/string/split.rb
|
61
47
|
lib/kyanite/symbol.rb
|
62
48
|
lib/kyanite/tree.rb
|
63
49
|
lib/kyanite/undoable.rb
|
64
|
-
lib/kyanite/unit_test.rb
|
65
50
|
test/_start_all.rb
|
66
51
|
test/array/test_array.rb
|
67
|
-
test/array/test_matrix2.rb
|
68
52
|
test/enumerable/test_enumerable_enumerables.rb
|
69
53
|
test/enumerable/test_enumerable_numerics.rb
|
70
54
|
test/enumerable/test_enumerable_strings.rb
|
@@ -77,6 +61,7 @@ test/string/test_cast.rb
|
|
77
61
|
test/string/test_chars.rb
|
78
62
|
test/string/test_diff.rb
|
79
63
|
test/string/test_list.rb
|
64
|
+
test/string/test_misc.rb
|
80
65
|
test/string/test_nested.rb
|
81
66
|
test/string/test_split.rb
|
82
67
|
test/test_dictionary.rb
|
data/README.rdoc
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
= Kyanite
|
2
|
+
http://bklippstein.github.com/kyanite/frames.html
|
3
|
+
|
4
|
+
Welcome to Kyanite. It's a general toolbox like Facets or ActiveSupport.
|
5
|
+
|
6
|
+
== Features
|
7
|
+
[{String}] Support for special letters like german umlauts. Reduce UTF8 strings to ASCII or less. Compare Strings. Parse nested brackets. Database Helpers.
|
8
|
+
[{Class}] Tools for reflection. Convert {Class} <=> {String} <=> {Symbol}.
|
9
|
+
[{Numeric} {Integer} {Float}] General tools.
|
10
|
+
[{Range}] Invert selection of an Array or String.
|
11
|
+
[{Array}] General tools. Mean values. Sum, product, parallel.
|
12
|
+
[{Set}] General tools. New class {OrderedSet} as alternative to {SortedSet}.
|
13
|
+
[{Hash} {Dictionary} {Tree::TreeNode Tree}] General tools.
|
14
|
+
[{Optimizer}] Find objects with min or max score.
|
15
|
+
[{Undoable}] Save and restore objects.
|
16
|
+
[{Object} {CallerUtils}] Repeats a block until the time is up. Silence Ruby warnings. Deep copy. Examine the call stack.
|
17
|
+
|
18
|
+
|
19
|
+
== Usage
|
20
|
+
require 'kyanite' # require all
|
21
|
+
require 'kyanite/basics' # require basic Kyanite behavior and features
|
22
|
+
require 'kyanite/string' # require all String related stuff
|
23
|
+
require 'kyanite/string/diff' # require all String#diff related stuff
|
24
|
+
|
25
|
+
If you use {http://bklippstein.github.com/transparent_nil/frames.html transparent_nil}, require it first:
|
26
|
+
require 'transparent_nil'
|
27
|
+
require 'kyanite'
|
28
|
+
|
29
|
+
|
30
|
+
== More Info
|
31
|
+
* *Documentation*: {http://bklippstein.github.com/kyanite/frames.html github.com/kyanite}
|
32
|
+
* *Source* *code*: {https://github.com/bklippstein/kyanite github.com/bklippstein}
|
33
|
+
* *License*: {http://creativecommons.org/licenses/by-sa/3.0/de/deed.en cc-by-sa Creative Commons Attribution-Share Alike 3.0 Germany}
|
34
|
+
* *Autor*: {mailto:klippstein@klippstein.com Björn Klippstein}
|
35
|
+
|
36
|
+
|
37
|
+
== Disclaimer
|
38
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
39
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
40
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
41
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
42
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
43
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
44
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile.rb
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
# ruby encoding: utf-8
|
2
|
+
# ü
|
3
|
+
require 'drumherum'
|
4
|
+
smart_init
|
5
|
+
require 'version'
|
6
|
+
require 'yard'
|
7
|
+
require 'drumherum/rake'
|
8
|
+
YARD::Rake::YardocTask.new
|
2
9
|
|
3
|
-
|
4
|
-
require
|
5
|
-
|
6
|
-
require 'kyanite/hoe'
|
7
|
-
Kyanite.projectname = projectname
|
8
|
-
Kyanite.github_username = 'bklippstein'
|
9
|
-
|
10
|
-
require 'rdoc/task'
|
11
|
-
require 'kyanite/rake'
|
12
|
-
|
13
|
-
|
10
|
+
Drumherum.github_username = 'bklippstein'
|
11
|
+
require 'kyanite'
|
14
12
|
|
15
13
|
|
16
14
|
# ----------------------------------------------------------------------------------------------
|
@@ -18,84 +16,37 @@ require 'kyanite/rake'
|
|
18
16
|
#
|
19
17
|
# http://nubyonrails.com/articles/tutorial-publishing-rubygems-with-hoe
|
20
18
|
#
|
21
|
-
$hoe = Hoe.spec
|
19
|
+
$hoe = Hoe.spec Drumherum.project_name do
|
22
20
|
|
23
21
|
# self.rubyforge_name = 'yourgemx' # if different than 'yourgem'
|
24
22
|
|
25
23
|
developer('Bjoern Klippstein', 'klippstein@klippstein.com')
|
26
24
|
summary = 'General toolbox like Facets or ActiveSupport.'
|
27
|
-
extra_deps << ['
|
25
|
+
extra_deps << ['drumherum', '>= 0.1.19']
|
26
|
+
extra_deps << ['transparent_nil', '>= 0.1.7']
|
28
27
|
extra_deps << ['activesupport', '>= 3.2.8']
|
29
28
|
extra_deps << ['facets', '>= 2.9.3']
|
30
29
|
extra_deps << ['rubytree', '>= 0.8.3']
|
31
30
|
remote_rdoc_dir = '' # Release to root only one project
|
32
|
-
urls = [[
|
33
|
-
|
31
|
+
urls = [[Drumherum.url_docs], [Drumherum.url_source]]
|
34
32
|
|
35
33
|
end
|
36
34
|
|
37
|
-
# require 'pp'
|
38
|
-
# pp $hoe
|
39
35
|
|
40
36
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
37
|
# ----------------------------------------------------------------------------------------------
|
45
|
-
#
|
38
|
+
# Hide Tasks
|
46
39
|
#
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
40
|
+
|
41
|
+
hide_tasks [ :announce, :audit, :check_extra_deps, :clobber_docs, :clobber_package, :default ]
|
42
|
+
hide_tasks [ :dcov, :debug_email, :docs, :gem, :git_add, :git_commit, :git_push, :install_gem ]
|
43
|
+
hide_tasks [ :newb, :package, :post_blog, :publish_docs, :release, :release_sanity, :release_to_gemcutter ]
|
44
|
+
hide_tasks [ :repackage, :ridocs, :sleep_15, :sleep_5, :utf8, :yard, :yard_post ]
|
52
45
|
|
53
|
-
desc "generate RDoc documentation"
|
54
|
-
Rake::RDocTask.new(:docs) do |rd|
|
55
46
|
|
56
|
-
rd.title = "#{Kyanite.projectname.capitalize} #{Kyanite.projectname.to_class.const_get('VERSION')}"
|
57
|
-
|
58
|
-
rd.rdoc_dir = 'doc'
|
59
|
-
rd.rdoc_files.include('lib/**/*.rb')
|
60
|
-
rd.rdoc_files.include('test/**/test_*.rb')
|
61
|
-
rd.rdoc_files.include('README.txt', 'License.txt', 'History.txt', 'Div')
|
62
|
-
|
63
|
-
rd.rdoc_files.exclude('lib/kyanite/array/array2')
|
64
|
-
rd.rdoc_files.exclude('lib/kyanite/array/matrix2')
|
65
|
-
rd.rdoc_files.exclude('lib/kyanite/operation/call_tracker')
|
66
|
-
|
67
|
-
rd.options += [
|
68
|
-
'--tab-width', '4',
|
69
|
-
'--main', 'README.txt',
|
70
|
-
'--show-hash', # A name of the form #name in a comment is a possible hyperlink to an instance method name. When displayed, the # is removed unless this option is specified.
|
71
|
-
'--line-numbers',
|
72
|
-
'--all',
|
73
|
-
'--charset=utf8'
|
74
|
-
]
|
75
|
-
|
76
|
-
end
|
77
47
|
|
78
48
|
|
79
|
-
# ----------------------------------------------------------------------------------------------
|
80
|
-
# Local Tasks
|
81
|
-
#
|
82
|
-
|
83
|
-
remove_task 'ridocs'
|
84
|
-
remove_task 'rdoc'
|
85
|
-
remove_task 'audit'
|
86
|
-
remove_task 'dcov'
|
87
|
-
remove_task 'debug_email'
|
88
|
-
remove_task 'debug_gem'
|
89
|
-
remove_task 'deploy'
|
90
|
-
remove_task 'deps:email'
|
91
|
-
remove_task 'install_gem'
|
92
|
-
remove_task 'multi'
|
93
|
-
remove_task 'newb'
|
94
|
-
#Dir['tasks/**/*.rake'].each { |t| load t }
|
95
|
-
|
96
49
|
|
97
|
-
|
98
|
-
|
99
50
|
|
100
51
|
|
101
52
|
|
data/console.rb
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
# File: script/console
|
3
3
|
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
4
|
libs = " -r irb/completion"
|
5
|
-
|
6
|
-
|
7
|
-
puts "Welcome to Kyanite gem"
|
8
|
-
|
5
|
+
initfile = File.join(File.dirname(__FILE__), 'init.rb' )
|
6
|
+
libs << " -r #{initfile}"
|
9
7
|
exec "#{irb} #{libs} --simple-prompt --noreadline"
|
data/lib/kyanite.rb
CHANGED
@@ -1,25 +1,162 @@
|
|
1
1
|
# ruby encoding: utf-8
|
2
|
-
|
2
|
+
# ü
|
3
3
|
# Required alle Kyanite-Libs
|
4
4
|
# -- eine Auswahl der wichtigsten Kyanite-Libs required man mit
|
5
5
|
# require 'kyanite/basics'
|
6
6
|
|
7
|
+
# @!macro [new] navigation
|
8
|
+
# {Object} {String} {Class} {Symbol}
|
9
|
+
# {Integer} {Float}
|
10
|
+
# {Range}
|
11
|
+
# {Array}
|
12
|
+
# {Set}
|
13
|
+
# {Dictionary} {Hash}
|
14
|
+
# {Tree::TreeNode Tree} {Optimizer} {Undoable} {CallerUtils}
|
15
|
+
|
16
|
+
|
17
|
+
# @!macro [new] array
|
18
|
+
# === Array Additions
|
19
|
+
# [Kyanite definitions] {Array}
|
20
|
+
# [Kyanite tests and examples] {TestKyaniteArray}
|
21
|
+
# [Usage] +require 'kyanite/array'+
|
22
|
+
|
23
|
+
|
24
|
+
# @!macro [new] dictionary
|
25
|
+
# === Dictionary Additions
|
26
|
+
# [Kyanite definitions] {Dictionary}, {Hash}
|
27
|
+
# [Kyanite tests and examples] {TestKyaniteDictionary}
|
28
|
+
# [Base class] {http://rubydoc.info/github/rubyworks/hashery/master/Hashery/Dictionary +Hashery::Dictionary+} (A Dictionary is a Hash that preserves order.)
|
29
|
+
# [Usage] +require 'kyanite/dictionary'+
|
30
|
+
#
|
31
|
+
|
32
|
+
# @!macro [new] enum_of_enums
|
33
|
+
# === Enumeration Of Enumerations
|
34
|
+
# Two-dimensional enumerables or enumerables of objects, which are enumerable.
|
35
|
+
#
|
36
|
+
# [Kyanite definitions] {EnumerableEnumerables}
|
37
|
+
# [Kyanite class with module included] {ArrayOfEnumerables}
|
38
|
+
# [Kyanite tests and examples] {TestKyaniteEnumerableEnumerables}
|
39
|
+
# [Usage] +require 'kyanite/enumerable/enumerable_enumerables'+
|
40
|
+
#
|
41
|
+
|
42
|
+
# @!macro [new] enum_of_numerics
|
43
|
+
# === Enumeration Of Numerics
|
44
|
+
# [Kyanite definitions] {EnumerableNumerics}
|
45
|
+
# [Kyanite class with module included] {ArrayOfNumerics}
|
46
|
+
# [Kyanite tests and examples] {TestKyaniteEnumerableNumerics}
|
47
|
+
# [Usage] +require 'kyanite/enumerable/enumerable_numerics'+
|
48
|
+
#
|
49
|
+
|
50
|
+
# @!macro [new] enum_of_strings
|
51
|
+
# === Enumeration Of Strings
|
52
|
+
# [Kyanite definitions] {EnumerableStrings}
|
53
|
+
# [Kyanite class with module included] {ArrayOfStrings}
|
54
|
+
# [Kyanite tests and examples] {TestKyaniteEnumerableStrings}
|
55
|
+
# [Usage] +require 'kyanite/enumerable/enumerable_strings'+
|
56
|
+
#
|
57
|
+
|
58
|
+
# @!macro [new] enumerable
|
59
|
+
# === Enumerable Additions
|
60
|
+
# [Kyanite definitions] {Enumerable}
|
61
|
+
# [Kyanite tests and examples] {TestKyaniteEnumerableStructure}
|
62
|
+
# [Usage] +require 'kyanite/enumerable/structure'+
|
7
63
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
64
|
+
# @!macro [new] class_utils
|
65
|
+
# === Class Utils
|
66
|
+
# [Kyanite definitions] {Class}, {Symbol}, {String}
|
67
|
+
# [Kyanite tests and examples] {TestKyaniteClassutils}
|
68
|
+
# [Usage] +require 'kyanite/general/classutils'+
|
69
|
+
#
|
13
70
|
|
71
|
+
# @!macro [new] hash
|
72
|
+
# === Hash Additions
|
73
|
+
# [Kyanite definitions] {Dictionary}, {Hash}
|
74
|
+
# [Kyanite tests and examples] {TestKyaniteHash}
|
75
|
+
# [Usage] +require 'kyanite/hash'+
|
76
|
+
#
|
77
|
+
# Note: If you define the method +==+ in any object, you have to define +hash+ as well.
|
78
|
+
#
|
79
|
+
# Note: Rubys +delete+ and +delete_if+ methods are working in-place, even if the name does not implicate that.
|
80
|
+
# And they return the deleted value, not the hash.
|
81
|
+
#
|
14
82
|
|
83
|
+
# @!macro [new] numeric
|
84
|
+
# === Numeric Additions
|
85
|
+
# [Kyanite definitions] {Numeric} {Integer} {Float}
|
86
|
+
# [Kyanite tests and examples] {TestKyaniteNumeric}
|
87
|
+
# [Usage] +require 'kyanite/numeric'+
|
88
|
+
#
|
15
89
|
|
90
|
+
# @!macro [new] optimizer
|
91
|
+
# === Optimizer
|
92
|
+
# [Kyanite definitions] {Optimizer}
|
93
|
+
# [Kyanite tests and examples] {TestKyaniteOptimizer}
|
94
|
+
#
|
95
|
+
# Selection of objects based on scores.
|
96
|
+
# Each object is written to the Optimizer by a +push+ command, together with it's score.
|
97
|
+
# +content_max+ and +content_min+ result the object with the highest / lowest score.
|
98
|
+
# The access to the second and third objects is possible by deleting objects with
|
99
|
+
# +delete_max+ or +delete_min+.
|
16
100
|
|
17
|
-
|
101
|
+
# @!macro [new] range
|
102
|
+
# === Range Additions
|
103
|
+
# [Kyanite definitions] {Range}
|
104
|
+
# [Kyanite tests and examples] {TestKyaniteRange}
|
105
|
+
# [Usage] +require 'kyanite/range'+
|
18
106
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
107
|
+
# @!macro [new] set
|
108
|
+
# === Set Classes and Additions
|
109
|
+
# [Kyanite definitions] {Set}, {SortedSet}, {OrderedSet}
|
110
|
+
# [Kyanite tests and examples] {TestKyaniteSet}
|
111
|
+
# [Usage] +require 'kyanite/set'+
|
112
|
+
# === Differences between the set classes
|
113
|
+
# [{http://www.ruby-doc.org/stdlib-1.9.3/libdoc/set/rdoc/Set.html +Set+}] is unordered. Examples: {TestKyaniteSet#test_set test_set}
|
114
|
+
# [{OrderedSet}] is ordered, it retains the original order, but it will not continually re-sorted -- as long you don't use {http://rubydoc.info/github/rubyworks/hashery/master/Hashery/Dictionary:order_by +Dictionary#order_by+}. Examples: {TestKyaniteSet#test_ordered_set test_ordered_set}
|
115
|
+
# [{http://www.ruby-doc.org/stdlib-1.9.3/libdoc/set/rdoc/SortedSet.html +SortedSet+}] is ordered and sorted. It is always in order. Examples: {TestKyaniteSet#test_sorted_set test_sorted_set}
|
116
|
+
#
|
117
|
+
|
118
|
+
# @!macro [new] string
|
119
|
+
# === String Additions
|
120
|
+
# [Kyanite definitions] {String}
|
121
|
+
# [Kyanite tests and examples] {TestKyaniteStringCast Cast} {TestKyaniteStringChars Chars} {TestKyaniteStringDiff Diff} {TestKyaniteStringList Database-Helper} {TestKyaniteStringMisc Miscellaneous} {TestKyaniteStringNested Nested} {TestKyaniteStringSplit Split}
|
122
|
+
# [Usage] +require 'kyanite/string'+
|
123
|
+
# === Required from {http://rubyworks.github.com/rubyfaux/?doc=http://rubyworks.github.com/facets/docs/facets-2.9.3/core.json#api-class-String Facets String}:
|
124
|
+
# [+shatter(re)+] Breaks a string up into an array based on a regular expression. Similar to scan, but includes the matches.
|
125
|
+
#
|
126
|
+
|
127
|
+
|
128
|
+
# @!macro [new] tree
|
129
|
+
# === Rubytree Additions
|
130
|
+
# [Kyanite definitions] {Tree::TreeNode}
|
131
|
+
# [Kyanite tests and examples] {TestKyaniteTree}
|
132
|
+
# [Base class] {http://rubytree.rubyforge.org +rubytree+}
|
133
|
+
# [Usage] +require 'kyanite/tree'+
|
134
|
+
|
135
|
+
# @!macro [new] object
|
136
|
+
# === Object Additions
|
137
|
+
# [Kyanite definitions] {Object}, {KKernel}
|
138
|
+
# [Kyanite tests and examples] {TestKyaniteObject}
|
139
|
+
# [Usage] +require 'kyanite/basics'+
|
140
|
+
|
141
|
+
# @!macro [new] undoable
|
142
|
+
# === Undoable Module
|
143
|
+
# [Kyanite definitions] {Undoable}
|
144
|
+
# [Kyanite tests and examples]
|
145
|
+
# [Usage] +require 'kyanite/general/undoable'+
|
146
|
+
|
147
|
+
# @!macro [new] true_false
|
148
|
+
# === TrueClass & FalseClass
|
149
|
+
# [Kyanite definitions] {TrueClass} {FalseClass}
|
150
|
+
# [Kyanite tests and examples] {TestKyaniteTrueFalse}
|
151
|
+
# [Usage] +require 'kyanite/general/true_false'+
|
152
|
+
|
153
|
+
# @!macro [new] caller_utils
|
154
|
+
# === CallerUtils
|
155
|
+
# [Kyanite definitions] {CallerUtils}
|
156
|
+
# [Kyanite tests and examples]
|
157
|
+
# [Usage] +require 'kyanite/general/callerutils'+
|
158
|
+
|
159
|
+
require 'drumherum'
|
23
160
|
|
24
161
|
require 'kyanite/array'
|
25
162
|
# require 'kyanite/basics' # Auswahl
|
@@ -27,9 +164,7 @@ end
|
|
27
164
|
require 'kyanite/enumerable'
|
28
165
|
require 'kyanite/general'
|
29
166
|
require 'kyanite/hash'
|
30
|
-
|
31
|
-
require 'kyanite/numeric'
|
32
|
-
# require 'kyanite/operation' # nur manuell
|
167
|
+
require 'kyanite/numeric'
|
33
168
|
require 'kyanite/optimizer'
|
34
169
|
require 'kyanite/range'
|
35
170
|
require 'kyanite/set'
|
@@ -38,3 +173,5 @@ end
|
|
38
173
|
require 'kyanite/tree'
|
39
174
|
# require 'kyanite/unit_test' # nur für Tests
|
40
175
|
|
176
|
+
Drumherum::loaded!
|
177
|
+
|