facets 2.4.5 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +6 -2
- data/CHANGES +46 -52
- data/MANIFEST +680 -642
- data/README +3 -10
- data/RELEASE +82 -36
- data/VERSION +1 -1
- data/doc/archive/{changelog-0.rdoc → CHANGELOG-0.10.30} +0 -0
- data/doc/archive/{changelog-1.rdoc → CHANGELOG-1.8.54} +0 -0
- data/doc/archive/CHANGELOG-2.4.5 +1654 -0
- data/doc/{news → archive}/RELEASE-2.0.5 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.2 +0 -0
- data/doc/{news → archive}/RELEASE-2.1.3 +0 -0
- data/doc/{news → archive}/RELEASE-2.2.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.2.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.3.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.0 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.1 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.2 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.3 +0 -0
- data/doc/{news → archive}/RELEASE-2.4.4 +0 -0
- data/doc/archive/RELEASE-2.4.5 +37 -0
- data/doc/{book/history.rdoc → guide/notes.rd} +62 -4
- data/doc/log/basic_stats/index.html +39 -0
- data/doc/log/bstats/stats.html +39 -0
- data/doc/log/changelog.html +141 -0
- data/doc/log/changelog.txt +1609 -0
- data/doc/log/stats.html +25 -0
- data/doc/log/testlog.txt +278 -0
- data/doc/rdoc/core/classes/Array.html +158 -147
- data/doc/rdoc/core/classes/Binding.html +54 -54
- data/doc/rdoc/core/classes/Class.html +59 -57
- data/doc/rdoc/core/classes/Comparable.html +67 -76
- data/doc/rdoc/core/classes/Dir.html +47 -47
- data/doc/rdoc/core/classes/Enumerable.html +232 -192
- data/doc/rdoc/core/classes/Exception.html +15 -16
- data/doc/rdoc/core/classes/File.html +128 -85
- data/doc/rdoc/core/classes/FileTest.html +7 -7
- data/doc/rdoc/core/classes/Float.html +16 -14
- data/doc/rdoc/core/classes/Functor.html +12 -12
- data/doc/rdoc/core/classes/Hash.html +490 -319
- data/doc/rdoc/core/classes/Indexable.html +110 -110
- data/doc/rdoc/core/classes/InstanceVariables.html +44 -44
- data/doc/rdoc/core/classes/Integer.html +122 -116
- data/doc/rdoc/core/classes/Kernel.html +415 -401
- data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
- data/doc/rdoc/core/classes/MatchData.html +24 -21
- data/doc/rdoc/core/classes/Module.html +230 -229
- data/doc/rdoc/core/classes/NilClass.html +28 -26
- data/doc/rdoc/core/classes/Numeric.html +30 -30
- data/doc/rdoc/core/classes/Object.html +8 -8
- data/doc/rdoc/core/classes/{Friend.html → ObjectSpace.html} +25 -48
- data/doc/rdoc/core/classes/Proc.html +29 -27
- data/doc/rdoc/core/classes/Range.html +17 -15
- data/doc/rdoc/core/classes/Regexp.html +17 -17
- data/doc/rdoc/core/classes/Stackable.html +31 -31
- data/doc/rdoc/core/classes/String.html +445 -401
- data/doc/rdoc/{more/classes/CLI/NoOptionError.html → core/classes/Struct.html} +24 -21
- data/doc/rdoc/core/classes/Symbol.html +73 -65
- data/doc/rdoc/core/classes/Time.html +87 -86
- data/doc/rdoc/core/classes/TrueClass.html +8 -8
- data/doc/rdoc/core/classes/UnboundMethod.html +17 -16
- data/doc/rdoc/core/created.rid +1 -1
- data/doc/rdoc/core/files/README.html +10 -16
- data/doc/rdoc/core/files/lib/core/facets/array/combination_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/conjoin_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/delete_rb.html +10 -1
- data/doc/rdoc/core/files/lib/core/facets/array/delete_unless_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/array/delete_values_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/array/index_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/indexable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/merge_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/only_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/pad_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/permutation_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/product_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/rotate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/select_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/splice_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/array/stackable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/binding/caller_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/binding/callstack_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/binding/defined_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/bitmask_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/cattr_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/descendents_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/prepend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/class/to_proc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/at_least_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/at_most_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/bound_rb.html +5 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/cap_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/clip_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/comparable/cmp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/comparable/comparable_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/ascend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/multiglob_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/dir/recurse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/accumulate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/cluster_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/collect_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/commonality_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/count_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/divide_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/duplicates_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/each_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/entropy_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/frequency_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/graph_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/enumerable/group_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/inject_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/map_send_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/mash_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/mode_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/modulate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/none_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/occur_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/one_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/probability_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/sum_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/enumerable/take_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/enumerable/uniq_by_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/exception/detail_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/exception/suppress_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/append_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/create_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/null_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/read_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/rewrite_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/rootname_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/split_all_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/file/split_root_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/write_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/file/writelines_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/filetest/root_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/alias_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/autonew_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/collate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/delete_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/insert_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/inverse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/join_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/keys_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_add_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_and_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_mul_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_or_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_push_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/op_sub_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/rekey_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/replace_each_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/select_rb.html +1 -1
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/stringify_keys_rb.html +1 -1
- data/doc/rdoc/{more/files/lib/more → core/files/lib/core}/facets/hash/symbolize_keys_rb.html +2 -2
- data/doc/rdoc/core/files/lib/core/facets/hash/to_options_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/to_struct_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/traverse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/update_each_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/update_keys_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/update_rb.html +8 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/update_values_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/hash/weave_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/hash/zipnew_rb.html +1 -5
- data/doc/rdoc/core/files/lib/core/facets/integer/factorial_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/integer/multiple_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/integer/odd_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/__here___rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel/as_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/ask_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/attr_singleton_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/callstack_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/kernel/complete_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/constant_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/d_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/demo_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/ergo_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/instance_class_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/instance_variables_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/not_nil_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/object_send_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/p_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/populate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/qua_class_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/resc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/respond_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/returning_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/silence_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/kernel/try_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/matchdata/match_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/matchdata/matchset_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/metaid_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/abstract_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_accessor_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_method_chain_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/alias_module_function_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/ancestor_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/basename_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/conflict_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/include_function_module_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/instance_methods_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/is_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/methodize_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/modspace_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/module_load_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/nesting_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/op_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/prepend_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/redefine_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/rename_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/revise_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/spacename_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/module/wrap_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/nilclass/to_f_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/approx_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/distance_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/numeric/round_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/objectspace/classes_rb.html +92 -0
- data/doc/rdoc/{more/files/lib/more/facets/dictionarymatcher_rb.html → core/files/lib/core/facets/objectspace_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/proc/bind_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/compose_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/to_method_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/proc/update_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/combine_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/overlap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/range/within_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/regexp/arity_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/align_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/bracket_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/camelcase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/capitalized_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/chars_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/chomp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/cleave_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/compress_lines_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/contains_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/divide_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/expand_tab_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/fold_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/indent_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/interpolate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/line_wrap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/lines_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/margin_rb.html +92 -0
- data/doc/rdoc/core/files/lib/core/facets/string/methodize_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/mscan_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/natcmp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/nchar_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/op_sub_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/outdent_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/string/range_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/rewrite_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/shatter_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/snakecase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/splice_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/start_with_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/tab_rb.html +8 -1
- data/doc/rdoc/core/files/lib/core/facets/string/tabto_rb.html +96 -0
- data/doc/rdoc/core/files/lib/core/facets/string/titlecase_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/to_re_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/string/word_wrap_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/struct/attributes_rb.html +92 -0
- data/doc/rdoc/{more/files/lib/more/facets/bytes_rb.html → core/files/lib/core/facets/struct_rb.html} +4 -4
- data/doc/rdoc/core/files/lib/core/facets/symbol/chomp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/generate_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/not_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/succ_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/symbol/to_proc_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/advance_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/change_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/elapse_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/hence_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/time/stamp_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/to_hash_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/unboundmethod/arguments_rb.html +1 -1
- data/doc/rdoc/core/files/lib/core/facets/unboundmethod/name_rb.html +1 -1
- data/doc/rdoc/core/fr_class_index.html +2 -1
- data/doc/rdoc/core/fr_file_index.html +30 -1
- data/doc/rdoc/core/fr_method_index.html +430 -423
- data/doc/rdoc/lore/classes/Date.html +6 -5
- data/doc/rdoc/{more/classes/CLI/Command/UniversalOptions.html → lore/classes/Enumerable.html} +7 -9
- data/doc/rdoc/lore/classes/Enumerable/Enumerator.html +147 -0
- data/doc/rdoc/lore/classes/OpenStruct.html +13 -15
- data/doc/rdoc/lore/created.rid +1 -1
- data/doc/rdoc/lore/files/README.html +10 -16
- data/doc/rdoc/lore/files/lib/lore/facets/date_rb.html +1 -1
- data/doc/rdoc/lore/files/lib/lore/facets/enumerator_rb.html +111 -0
- data/doc/rdoc/lore/files/lib/lore/facets/ostruct_rb.html +1 -1
- data/doc/rdoc/lore/fr_class_index.html +2 -0
- data/doc/rdoc/lore/fr_file_index.html +1 -0
- data/doc/rdoc/lore/fr_method_index.html +13 -12
- 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/Argvector.html +76 -76
- 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/BinReadable.html +85 -85
- data/doc/rdoc/more/classes/BinReadable/ByteOrder.html +25 -25
- data/doc/rdoc/more/classes/Binding.html +8 -8
- data/doc/rdoc/more/classes/BlankSlate.html +5 -5
- data/doc/rdoc/more/classes/Buildable.html +4 -4
- data/doc/rdoc/more/classes/BuildingBlock.html +32 -32
- data/doc/rdoc/more/classes/Capsule.html +41 -41
- data/doc/rdoc/more/classes/Cloneable.html +4 -4
- data/doc/rdoc/more/classes/ConsoleUtils.html +22 -22
- 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/Downloader.html +56 -56
- data/doc/rdoc/more/classes/Duration.html +369 -445
- data/doc/rdoc/more/classes/Duration/Numeric.html +389 -0
- data/doc/rdoc/more/classes/{CLI/NoCommandError.html → Duration/Time.html} +30 -17
- data/doc/rdoc/more/classes/Enumerable.html +114 -51
- 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/Enumerable/Filterable.html +246 -0
- data/doc/rdoc/more/classes/EnumerablePass.html +17 -17
- data/doc/rdoc/more/classes/{RecursiveDependency.html → Enumerator.html} +7 -4
- data/doc/rdoc/more/classes/{CLI.html → Enumerator/Filter.html} +22 -26
- data/doc/rdoc/more/classes/Equatable.html +16 -16
- data/doc/rdoc/more/classes/Expirable.html +17 -17
- data/doc/rdoc/more/classes/FileList.html +125 -125
- 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 +16 -162
- 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/Instantize.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/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/more/classes/{DictionaryMatcher.html → Matcher.html} +66 -68
- data/doc/rdoc/more/classes/{DictionaryMatcher → Matcher}/MatchData.html +8 -8
- data/doc/rdoc/more/classes/{CacheDecorator.html → Memoizer.html} +64 -46
- data/doc/rdoc/more/classes/Module.html +182 -361
- 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 +8 -8
- data/doc/rdoc/more/classes/NullClass.html +24 -24
- data/doc/rdoc/more/classes/Numeric/Multipliers.html +456 -0
- data/doc/rdoc/more/classes/ObjectReflection.html +12 -12
- data/doc/rdoc/more/classes/OpEsc.html +8 -7
- 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/{EventHook.html → OpenModule.html} +24 -63
- data/doc/rdoc/more/classes/OpenObject.html +95 -95
- data/doc/rdoc/more/classes/OpenStructable.html +326 -0
- 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 +9 -9
- 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 +5 -5
- 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/SparseArray.html +1397 -0
- data/doc/rdoc/more/classes/Stash.html +232 -0
- data/doc/rdoc/more/classes/String/Mask.html +72 -72
- data/doc/rdoc/more/classes/String/Words.html +49 -49
- 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 +58 -58
- 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/VersionNumber.html +57 -57
- data/doc/rdoc/more/classes/XOXO.html +9 -9
- data/doc/rdoc/more/classes/ZipUtils.html +251 -118
- data/doc/rdoc/more/classes/ZipUtils/DryRun.html +203 -35
- data/doc/rdoc/more/classes/ZipUtils/NoWrite.html +203 -35
- data/doc/rdoc/more/classes/ZipUtils/Verbose.html +173 -35
- data/doc/rdoc/more/created.rid +1 -1
- data/doc/rdoc/more/files/README.html +10 -16
- data/doc/rdoc/more/files/lib/more/facets/attr_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/buildable_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/consoleutils_rb.html +1 -18
- data/doc/rdoc/more/files/lib/more/facets/dependency_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/duration_rb.html +1 -41
- data/doc/rdoc/more/files/lib/more/facets/elementor_rb.html +2 -1
- data/doc/rdoc/more/files/lib/more/facets/enumerablepass_rb.html +2 -1
- data/doc/rdoc/more/files/lib/more/facets/{fileshell_rb.html → filter_rb.html} +6 -5
- data/doc/rdoc/more/files/lib/more/facets/inheritor_rb.html +3 -28
- data/doc/rdoc/more/files/lib/more/facets/iteration_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/kernel/meta_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/matcher_rb.html +97 -0
- data/doc/rdoc/more/files/lib/more/facets/memoize_rb.html +7 -4
- data/doc/rdoc/more/files/lib/more/facets/{cachedecorator_rb.html → memoizer_rb.html} +23 -49
- data/doc/rdoc/more/files/lib/more/facets/multipliers_rb.html +2 -18
- data/doc/rdoc/more/files/lib/more/facets/nilstatus_rb.html +1 -1
- data/doc/rdoc/{core/files/lib/core/facets/callstack_rb.html → more/files/lib/more/facets/openmodule_rb.html} +4 -4
- data/doc/rdoc/more/files/lib/more/facets/opesc_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/ostructable_rb.html +92 -0
- data/doc/rdoc/more/files/lib/more/facets/pathlist_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/snapshot_rb.html +2 -2
- data/doc/rdoc/more/files/lib/more/facets/sparse_array_rb.html +92 -0
- data/doc/rdoc/more/files/lib/more/facets/stash_rb.html +166 -0
- data/doc/rdoc/more/files/lib/more/facets/string/words_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/succ_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/thread_rb.html +1 -1
- data/doc/rdoc/more/files/lib/more/facets/ziputils_rb.html +6 -34
- data/doc/rdoc/more/fr_class_index.html +13 -17
- data/doc/rdoc/more/fr_file_index.html +7 -15
- data/doc/rdoc/more/fr_method_index.html +1079 -1003
- data/doc/rdoc/more/index.html +1 -1
- data/lib/core/facets/array/conjoin.rb +1 -1
- data/lib/core/facets/array/delete.rb +3 -60
- data/lib/core/facets/array/delete_unless.rb +15 -0
- data/lib/core/facets/array/delete_values.rb +50 -0
- data/lib/core/facets/array/index.rb +0 -26
- data/lib/core/facets/array/indexable.rb +2 -2
- data/lib/core/facets/array/merge.rb +1 -1
- data/lib/core/facets/array/only.rb +1 -2
- data/lib/core/facets/array/pad.rb +2 -2
- data/lib/core/facets/array/permutation.rb +1 -1
- data/lib/core/facets/array/product.rb +2 -2
- data/lib/core/facets/array/rotate.rb +2 -4
- data/lib/core/facets/array/select.rb +1 -1
- data/lib/core/facets/array/splice.rb +1 -1
- data/lib/core/facets/array/stackable.rb +2 -2
- data/lib/core/facets/binding/caller.rb +2 -7
- data/lib/core/facets/binding/callstack.rb +1 -0
- data/lib/core/facets/binding/defined.rb +0 -1
- data/lib/core/facets/bitmask.rb +6 -9
- data/lib/core/facets/class/cattr.rb +6 -9
- data/lib/core/facets/class/descendents.rb +0 -2
- data/lib/core/facets/class/prepend.rb +3 -4
- data/lib/core/facets/class/to_proc.rb +0 -20
- data/lib/core/facets/comparable/at_least.rb +1 -0
- data/lib/core/facets/comparable/at_most.rb +1 -0
- data/lib/core/facets/comparable/bound.rb +1 -65
- data/lib/core/facets/comparable/cap.rb +34 -0
- data/lib/core/facets/comparable/clip.rb +38 -0
- data/lib/core/facets/comparable/cmp.rb +3 -3
- data/lib/core/facets/comparable/comparable.rb +1 -1
- data/lib/core/facets/dir/ascend.rb +2 -5
- data/lib/core/facets/dir/multiglob.rb +0 -2
- data/lib/core/facets/dir/recurse.rb +1 -2
- data/lib/core/facets/enumerable/accumulate.rb +2 -0
- data/lib/core/facets/enumerable/cluster_by.rb +1 -1
- data/lib/core/facets/enumerable/collect.rb +2 -2
- data/lib/core/facets/enumerable/commonality.rb +1 -1
- data/lib/core/facets/enumerable/count.rb +1 -1
- data/lib/core/facets/enumerable/divide.rb +1 -1
- data/lib/core/facets/enumerable/duplicates.rb +2 -2
- data/lib/core/facets/enumerable/each_by.rb +1 -1
- data/lib/core/facets/enumerable/entropy.rb +2 -2
- data/lib/core/facets/enumerable/frequency.rb +1 -1
- data/lib/core/facets/enumerable/graph.rb +1 -0
- data/lib/core/facets/enumerable/group_by.rb +1 -1
- data/lib/core/facets/enumerable/inject.rb +2 -3
- data/lib/core/facets/enumerable/map_send.rb +15 -3
- data/lib/core/facets/enumerable/mash.rb +4 -5
- data/lib/core/facets/enumerable/mode.rb +1 -1
- data/lib/core/facets/enumerable/modulate.rb +2 -2
- data/lib/core/facets/enumerable/none.rb +1 -1
- data/lib/core/facets/enumerable/occur.rb +0 -2
- data/lib/core/facets/enumerable/one.rb +1 -1
- data/lib/core/facets/enumerable/probability.rb +1 -1
- data/lib/core/facets/enumerable/sum.rb +1 -1
- data/lib/core/facets/enumerable/take.rb +20 -0
- data/lib/core/facets/enumerable/uniq_by.rb +0 -2
- data/lib/core/facets/exception/detail.rb +1 -1
- data/lib/core/facets/exception/suppress.rb +1 -2
- data/lib/core/facets/file/append.rb +1 -1
- data/lib/core/facets/file/create.rb +1 -1
- data/lib/core/facets/file/null.rb +1 -1
- data/lib/core/facets/file/read.rb +3 -3
- data/lib/core/facets/file/rewrite.rb +1 -1
- data/lib/core/facets/file/rootname.rb +1 -1
- data/lib/core/facets/file/split_all.rb +19 -0
- data/lib/core/facets/file/split_root.rb +3 -0
- data/lib/core/facets/file/write.rb +1 -1
- data/lib/core/facets/file/writelines.rb +1 -2
- data/lib/core/facets/filetest/root.rb +1 -1
- data/lib/core/facets/hash/alias.rb +1 -1
- data/lib/core/facets/hash/autonew.rb +1 -17
- data/lib/core/facets/hash/collate.rb +1 -1
- data/lib/core/facets/hash/delete.rb +3 -3
- data/lib/core/facets/hash/insert.rb +1 -1
- data/lib/core/facets/hash/inverse.rb +1 -1
- data/lib/core/facets/hash/join.rb +1 -1
- data/lib/core/facets/hash/keys.rb +3 -3
- data/lib/core/facets/hash/op_add.rb +1 -1
- data/lib/core/facets/hash/op_and.rb +1 -1
- data/lib/core/facets/hash/op_mul.rb +1 -1
- data/lib/core/facets/hash/op_or.rb +1 -1
- data/lib/core/facets/hash/op_push.rb +1 -1
- data/lib/core/facets/hash/op_sub.rb +1 -1
- data/lib/core/facets/hash/rekey.rb +11 -7
- data/lib/core/facets/hash/replace_each.rb +16 -0
- data/lib/core/facets/hash/select.rb +1 -2
- data/lib/{more → core}/facets/hash/stringify_keys.rb +0 -0
- data/lib/core/facets/hash/symbolize_keys.rb +94 -0
- data/lib/core/facets/hash/to_options.rb +1 -0
- data/lib/core/facets/hash/to_struct.rb +1 -1
- data/lib/core/facets/hash/traverse.rb +2 -2
- data/lib/core/facets/hash/update.rb +5 -80
- data/lib/core/facets/hash/update_each.rb +18 -0
- data/lib/core/facets/hash/update_keys.rb +20 -0
- data/lib/core/facets/hash/update_values.rb +20 -0
- data/lib/core/facets/hash/weave.rb +1 -1
- data/lib/core/facets/hash/zipnew.rb +17 -1
- data/lib/core/facets/integer/factorial.rb +1 -1
- data/lib/core/facets/integer/multiple.rb +1 -1
- data/lib/core/facets/integer/odd.rb +2 -2
- data/lib/core/facets/kernel/__here__.rb +8 -0
- data/lib/core/facets/kernel/as.rb +2 -2
- data/lib/core/facets/kernel/attr_singleton.rb +5 -5
- data/lib/core/facets/{callstack.rb → kernel/callstack.rb} +1 -1
- data/lib/core/facets/kernel/complete.rb +1 -1
- data/lib/core/facets/kernel/constant.rb +1 -1
- data/lib/core/facets/kernel/d.rb +1 -5
- data/lib/core/facets/kernel/demo.rb +2 -2
- data/lib/core/facets/kernel/ergo.rb +2 -2
- data/lib/core/facets/kernel/instance_class.rb +1 -1
- data/lib/core/facets/kernel/instance_variables.rb +2 -4
- data/lib/core/facets/kernel/not_nil.rb +1 -1
- data/lib/core/facets/kernel/object_send.rb +1 -1
- data/lib/core/facets/kernel/p.rb +1 -1
- data/lib/core/facets/kernel/populate.rb +2 -2
- data/lib/core/facets/kernel/qua_class.rb +2 -2
- data/lib/core/facets/kernel/resc.rb +1 -1
- data/lib/core/facets/kernel/respond.rb +1 -1
- data/lib/core/facets/kernel/returning.rb +1 -1
- data/lib/core/facets/kernel/silence.rb +4 -4
- data/lib/core/facets/kernel/try.rb +5 -3
- data/lib/core/facets/matchdata/match.rb +1 -1
- data/lib/core/facets/matchdata/matchset.rb +2 -2
- data/lib/core/facets/metaid.rb +5 -5
- data/lib/core/facets/module/abstract.rb +1 -1
- data/lib/core/facets/module/alias_accessor.rb +3 -3
- data/lib/core/facets/module/alias_method_chain.rb +1 -2
- data/lib/core/facets/module/alias_module_function.rb +1 -1
- data/lib/core/facets/module/ancestor.rb +1 -1
- data/lib/core/facets/module/basename.rb +1 -1
- data/lib/core/facets/module/conflict.rb +1 -2
- data/lib/core/facets/module/include_function_module.rb +1 -1
- data/lib/core/facets/module/instance_methods.rb +4 -6
- data/lib/core/facets/module/is.rb +2 -2
- data/lib/core/facets/module/modspace.rb +1 -1
- data/lib/core/facets/module/module_load.rb +2 -2
- data/lib/core/facets/module/nesting.rb +1 -1
- data/lib/core/facets/module/op.rb +3 -6
- data/lib/core/facets/module/prepend.rb +1 -1
- data/lib/core/facets/module/redefine_method.rb +1 -1
- data/lib/core/facets/module/rename_method.rb +1 -1
- data/lib/core/facets/module/revise.rb +2 -2
- data/lib/core/facets/module/spacename.rb +1 -1
- data/lib/core/facets/module/wrap_method.rb +1 -1
- data/lib/core/facets/nilclass/to_f.rb +1 -1
- data/lib/core/facets/numeric/approx.rb +1 -1
- data/lib/core/facets/numeric/distance.rb +1 -1
- data/lib/core/facets/numeric/round.rb +3 -6
- data/lib/core/facets/objectspace.rb +6 -0
- data/lib/core/facets/objectspace/classes.rb +11 -0
- data/lib/core/facets/proc/bind.rb +1 -1
- data/lib/core/facets/proc/compose.rb +2 -2
- data/lib/core/facets/proc/to_method.rb +1 -1
- data/lib/core/facets/proc/update.rb +1 -1
- data/lib/core/facets/range/combine.rb +2 -2
- data/lib/core/facets/range/overlap.rb +1 -2
- data/lib/core/facets/range/within.rb +2 -4
- data/lib/core/facets/regexp/arity.rb +1 -1
- data/lib/core/facets/string/align.rb +3 -3
- data/lib/core/facets/string/bracket.rb +6 -6
- data/lib/core/facets/string/camelcase.rb +1 -1
- data/lib/core/facets/string/capitalized.rb +3 -3
- data/lib/core/facets/string/chars.rb +1 -1
- data/lib/core/facets/string/chomp.rb +2 -2
- data/lib/core/facets/string/cleave.rb +1 -1
- data/lib/core/facets/string/compress_lines.rb +17 -0
- data/lib/core/facets/string/contains.rb +7 -0
- data/lib/core/facets/string/divide.rb +1 -1
- data/lib/core/facets/string/expand_tab.rb +35 -0
- data/lib/core/facets/string/fold.rb +1 -1
- data/lib/core/facets/string/indent.rb +25 -0
- data/lib/core/facets/string/interpolate.rb +1 -1
- data/lib/core/facets/string/line_wrap.rb +1 -1
- data/lib/core/facets/string/lines.rb +1 -2
- data/lib/core/facets/string/margin.rb +30 -0
- data/lib/core/facets/string/methodize.rb +1 -1
- data/lib/core/facets/string/mscan.rb +1 -1
- data/lib/core/facets/string/natcmp.rb +1 -2
- data/lib/core/facets/string/nchar.rb +0 -2
- data/lib/core/facets/string/op_sub.rb +1 -1
- data/lib/core/facets/string/outdent.rb +1 -0
- data/lib/core/facets/string/range.rb +4 -5
- data/lib/core/facets/string/rewrite.rb +1 -1
- data/lib/core/facets/string/shatter.rb +1 -1
- data/lib/core/facets/string/snakecase.rb +1 -1
- data/lib/core/facets/string/splice.rb +2 -2
- data/lib/core/facets/string/start_with.rb +2 -4
- data/lib/core/facets/string/tab.rb +9 -92
- data/lib/core/facets/string/tabto.rb +19 -0
- data/lib/core/facets/string/titlecase.rb +1 -1
- data/lib/core/facets/string/to_re.rb +2 -2
- data/lib/core/facets/string/word_wrap.rb +2 -4
- data/lib/core/facets/struct.rb +6 -0
- data/lib/core/facets/struct/attributes.rb +11 -0
- data/lib/core/facets/symbol/chomp.rb +2 -2
- data/lib/core/facets/symbol/generate.rb +1 -1
- data/lib/core/facets/symbol/not.rb +2 -2
- data/lib/core/facets/symbol/succ.rb +1 -1
- data/lib/core/facets/symbol/to_proc.rb +2 -3
- data/lib/core/facets/time/advance.rb +2 -1
- data/lib/core/facets/time/elapse.rb +1 -1
- data/lib/core/facets/time/hence.rb +16 -13
- data/lib/core/facets/time/stamp.rb +2 -2
- data/lib/core/facets/to_hash.rb +1 -1
- data/lib/core/facets/unboundmethod/arguments.rb +1 -1
- data/lib/core/facets/unboundmethod/name.rb +1 -1
- data/lib/lore/facets/date.rb +2 -2
- data/lib/lore/facets/enumerator.rb +67 -0
- data/lib/lore/facets/ostruct.rb +3 -7
- data/lib/more/facets/attr.rb +10 -9
- data/lib/more/facets/consoleutils.rb +1 -15
- data/lib/more/facets/dependency.rb +1 -1
- data/lib/more/facets/duration.rb +271 -525
- data/lib/more/facets/filter.rb +121 -0
- data/lib/more/facets/inheritor.rb +37 -58
- data/lib/more/facets/iteration.rb +1 -1
- data/lib/more/facets/kernel/meta.rb +1 -1
- data/lib/more/facets/{dictionarymatcher.rb → matcher.rb} +15 -11
- data/lib/more/facets/memoize.rb +9 -12
- data/lib/more/facets/memoizer.rb +74 -0
- data/lib/more/facets/multipliers.rb +54 -66
- data/lib/more/facets/nilstatus.rb +3 -2
- data/lib/more/facets/openmodule.rb +15 -0
- data/lib/more/facets/opesc.rb +1 -1
- data/lib/more/facets/ostructable.rb +212 -0
- data/lib/more/facets/pathlist.rb +1 -0
- data/lib/more/facets/sparse_array.rb +809 -0
- data/lib/more/facets/stash.rb +66 -0
- data/lib/more/facets/string/words.rb +8 -11
- data/lib/more/facets/succ.rb +3 -3
- data/lib/more/facets/thread.rb +2 -2
- data/lib/more/facets/ziputils.rb +238 -97
- data/test/core/array/test_index.rb +17 -0
- data/test/core/class/test_cattr.rb +1 -1
- data/test/core/class/test_to_proc.rb +13 -0
- data/test/core/comparable/test_cap.rb +25 -0
- data/test/core/comparable/{test_bound.rb → test_clip.rb} +1 -20
- data/test/core/file/test_split_all.rb +32 -0
- data/test/core/hash/test_op_mul.rb +1 -1
- data/test/core/hash/test_op_push.rb +7 -0
- data/test/core/hash/test_replace_each.rb +14 -0
- data/test/core/hash/test_update_each.rb +13 -0
- data/test/core/hash/test_update_keys.rb +18 -0
- data/test/core/hash/test_update_values.rb +12 -0
- data/test/core/kernel/test_callstack.rb +1 -1
- data/test/core/string/test_indent.rb +13 -0
- data/test/core/string/test_margin.rb +100 -0
- data/test/core/string/test_outdent.rb +65 -0
- data/test/core/string/test_tab.rb +1 -162
- data/test/core/string/test_tabto.rb +13 -0
- data/test/{more → core}/test_metaid.rb +8 -8
- data/test/core/time/test_hence.rb +118 -4
- data/test/core/unboundmethod/test_name.rb +1 -1
- data/test/more/{test_arguments.rb → test_argvector.rb} +8 -12
- data/test/more/test_filter.rb +87 -0
- data/test/more/test_memoize.rb +11 -9
- data/test/more/test_sparsearray.rb +279 -0
- metadata +741 -725
- data/demo/bench/bench_load.rb +0 -56
- data/demo/bench/enumerable/bench_collect.rb +0 -84
- data/demo/bench/enumerable/bench_count.rb +0 -58
- data/demo/bench/general/bench_calls.rb +0 -74
- data/demo/bench/general/bench_includes.rb +0 -25
- data/demo/bench/general/bench_methods.rb +0 -17
- data/demo/bench/general/bench_pathname.rb +0 -24
- data/demo/bench/general/bench_range.rb +0 -64
- data/demo/bench/general/bench_return.rb +0 -56
- data/demo/bench/general/bench_yeild.rb +0 -75
- data/demo/bench/general/comment_loading/bench.rb +0 -46
- data/demo/bench/general/comment_loading/comments_begin.rb +0 -109
- data/demo/bench/general/comment_loading/comments_end.rb +0 -127
- data/demo/bench/general/comment_loading/comments_none.rb +0 -1
- data/demo/bench/general/comment_loading/comments_sharp.rb +0 -125
- data/demo/bench/integer/bench_factorial.rb +0 -31
- data/demo/sample/annotations/annotations1.rb +0 -22
- data/demo/sample/ansicolor/cdiff.rb +0 -20
- data/demo/sample/ansicolor/example.rb +0 -82
- data/doc/book/notes.rdoc +0 -9
- data/doc/rdoc/more/classes/BigDuration.html +0 -323
- data/doc/rdoc/more/classes/CLI/Arguments.html +0 -488
- data/doc/rdoc/more/classes/CLI/Command.html +0 -316
- data/doc/rdoc/more/classes/Chain.html +0 -206
- data/doc/rdoc/more/classes/FileShell.html +0 -743
- data/doc/rdoc/more/classes/TagIterator.html +0 -581
- data/doc/rdoc/more/classes/UploadUtils.html +0 -497
- data/doc/rdoc/more/classes/Weekdays.html +0 -218
- data/doc/rdoc/more/files/lib/more/facets/annotations_rb.html +0 -180
- data/doc/rdoc/more/files/lib/more/facets/arguments_rb.html +0 -142
- data/doc/rdoc/more/files/lib/more/facets/cattr_rb.html +0 -125
- data/doc/rdoc/more/files/lib/more/facets/chain_rb.html +0 -114
- data/doc/rdoc/more/files/lib/more/facets/command_rb.html +0 -170
- data/doc/rdoc/more/files/lib/more/facets/eventhook_rb.html +0 -141
- data/doc/rdoc/more/files/lib/more/facets/tagiterator_rb.html +0 -111
- data/doc/rdoc/more/files/lib/more/facets/times_rb.html +0 -163
- data/doc/rdoc/more/files/lib/more/facets/uploadutils_rb.html +0 -176
- data/lib/more/facets/annotations.rb +0 -302
- data/lib/more/facets/arguments.rb +0 -365
- data/lib/more/facets/bytes.rb +0 -175
- data/lib/more/facets/cachedecorator.rb +0 -117
- data/lib/more/facets/chain.rb +0 -58
- data/lib/more/facets/command.rb +0 -439
- data/lib/more/facets/eventhook.rb +0 -132
- data/lib/more/facets/fileshell.rb +0 -202
- data/lib/more/facets/hash/symbolize_keys.rb +0 -94
- data/lib/more/facets/tagiter.rb +0 -366
- data/lib/more/facets/times.rb +0 -431
- data/lib/more/facets/uploadutils.rb +0 -464
- data/test/core/hash/test_update.rb +0 -46
- data/test/more/test_annotations.rb +0 -120
- data/test/more/test_bytes.rb +0 -71
- data/test/more/test_command.rb +0 -69
- data/test/more/test_times.rb +0 -89
@@ -58,6 +58,7 @@
|
|
58
58
|
<td>In:</td>
|
59
59
|
<td>
|
60
60
|
<a href="../files/lib/core/facets/to_hash_rb.html">lib/core/facets/to_hash.rb</a>
|
61
|
+
<a href="../files/lib/core/facets/enumerable/take_rb.html">lib/core/facets/enumerable/take.rb</a>
|
61
62
|
<a href="../files/lib/core/facets/enumerable/one_rb.html">lib/core/facets/enumerable/one.rb</a>
|
62
63
|
<a href="../files/lib/core/facets/enumerable/cluster_by_rb.html">lib/core/facets/enumerable/cluster_by.rb</a>
|
63
64
|
<a href="../files/lib/core/facets/enumerable/group_by_rb.html">lib/core/facets/enumerable/group_by.rb</a>
|
@@ -96,36 +97,37 @@
|
|
96
97
|
|
97
98
|
|
98
99
|
<div class="sectiontitle">Methods</div>
|
99
|
-
<span style="padding-right: 5px;"><a href="#
|
100
|
-
<span style="padding-right: 5px;"><a href="#
|
101
|
-
<span style="padding-right: 5px;"><a href="#
|
102
|
-
<span style="padding-right: 5px;"><a href="#
|
103
|
-
<span style="padding-right: 5px;"><a href="#
|
104
|
-
<span style="padding-right: 5px;"><a href="#
|
105
|
-
<span style="padding-right: 5px;"><a href="#
|
106
|
-
<span style="padding-right: 5px;"><a href="#
|
107
|
-
<span style="padding-right: 5px;"><a href="#
|
108
|
-
<span style="padding-right: 5px;"><a href="#
|
109
|
-
<span style="padding-right: 5px;"><a href="#
|
110
|
-
<span style="padding-right: 5px;"><a href="#
|
111
|
-
<span style="padding-right: 5px;"><a href="#
|
112
|
-
<span style="padding-right: 5px;"><a href="#
|
113
|
-
<span style="padding-right: 5px;"><a href="#
|
114
|
-
<span style="padding-right: 5px;"><a href="#
|
115
|
-
<span style="padding-right: 5px;"><a href="#
|
116
|
-
<span style="padding-right: 5px;"><a href="#
|
117
|
-
<span style="padding-right: 5px;"><a href="#
|
118
|
-
<span style="padding-right: 5px;"><a href="#
|
119
|
-
<span style="padding-right: 5px;"><a href="#
|
120
|
-
<span style="padding-right: 5px;"><a href="#
|
121
|
-
<span style="padding-right: 5px;"><a href="#
|
122
|
-
<span style="padding-right: 5px;"><a href="#
|
123
|
-
<span style="padding-right: 5px;"><a href="#
|
124
|
-
<span style="padding-right: 5px;"><a href="#
|
125
|
-
<span style="padding-right: 5px;"><a href="#
|
126
|
-
<span style="padding-right: 5px;"><a href="#
|
127
|
-
<span style="padding-right: 5px;"><a href="#
|
128
|
-
<span style="padding-right: 5px;"><a href="#
|
100
|
+
<span style="padding-right: 5px;"><a href="#M000435">accumulate</a></span>
|
101
|
+
<span style="padding-right: 5px;"><a href="#M000418">cluster_by</a></span>
|
102
|
+
<span style="padding-right: 5px;"><a href="#M000424">collect_with_index</a></span>
|
103
|
+
<span style="padding-right: 5px;"><a href="#M000422">commonality</a></span>
|
104
|
+
<span style="padding-right: 5px;"><a href="#M000427">compact_collect</a></span>
|
105
|
+
<span style="padding-right: 5px;"><a href="#M000426">compact_map</a></span>
|
106
|
+
<span style="padding-right: 5px;"><a href="#M000444">count</a></span>
|
107
|
+
<span style="padding-right: 5px;"><a href="#M000429">divide</a></span>
|
108
|
+
<span style="padding-right: 5px;"><a href="#M000432">duplicates</a></span>
|
109
|
+
<span style="padding-right: 5px;"><a href="#M000445">each_by</a></span>
|
110
|
+
<span style="padding-right: 5px;"><a href="#M000439">entropy</a></span>
|
111
|
+
<span style="padding-right: 5px;"><a href="#M000428">frequency</a></span>
|
112
|
+
<span style="padding-right: 5px;"><a href="#M000437">graph</a></span>
|
113
|
+
<span style="padding-right: 5px;"><a href="#M000419">group_by</a></span>
|
114
|
+
<span style="padding-right: 5px;"><a href="#M000440">ideal_entropy</a></span>
|
115
|
+
<span style="padding-right: 5px;"><a href="#M000430">inject!</a></span>
|
116
|
+
<span style="padding-right: 5px;"><a href="#M000442">map_send</a></span>
|
117
|
+
<span style="padding-right: 5px;"><a href="#M000425">map_with_index</a></span>
|
118
|
+
<span style="padding-right: 5px;"><a href="#M000436">mash</a></span>
|
119
|
+
<span style="padding-right: 5px;"><a href="#M000421">mode</a></span>
|
120
|
+
<span style="padding-right: 5px;"><a href="#M000438">modulate</a></span>
|
121
|
+
<span style="padding-right: 5px;"><a href="#M000433">none?</a></span>
|
122
|
+
<span style="padding-right: 5px;"><a href="#M000431">nonuniq</a></span>
|
123
|
+
<span style="padding-right: 5px;"><a href="#M000423">occur</a></span>
|
124
|
+
<span style="padding-right: 5px;"><a href="#M000417">one?</a></span>
|
125
|
+
<span style="padding-right: 5px;"><a href="#M000443">probability</a></span>
|
126
|
+
<span style="padding-right: 5px;"><a href="#M000441">split</a></span>
|
127
|
+
<span style="padding-right: 5px;"><a href="#M000420">sum</a></span>
|
128
|
+
<span style="padding-right: 5px;"><a href="#M000416">take</a></span>
|
129
|
+
<span style="padding-right: 5px;"><a href="#M000415">to_h</a></span>
|
130
|
+
<span style="padding-right: 5px;"><a href="#M000434">uniq_by</a></span>
|
129
131
|
|
130
132
|
|
131
133
|
|
@@ -135,7 +137,7 @@
|
|
135
137
|
<div class="sectiontitle">Public Instance methods</div>
|
136
138
|
<div class="method">
|
137
139
|
<div class="title">
|
138
|
-
<a name="
|
140
|
+
<a name="M000435"></a><b>accumulate</b>()
|
139
141
|
</div>
|
140
142
|
<div class="description">
|
141
143
|
<p>
|
@@ -149,13 +151,16 @@ For example, in an ORM design if Group has_many User then
|
|
149
151
|
</pre>
|
150
152
|
<p>
|
151
153
|
will return a list of users from all groups.
|
154
|
+
</p>
|
155
|
+
<p>
|
156
|
+
CREDIT: George Moshchovitis
|
152
157
|
</p>
|
153
158
|
</div>
|
154
159
|
<div class="sourcecode">
|
155
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
156
|
-
<div id="
|
160
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000435_source')" id="l_M000435_source">+</a> ]</p>
|
161
|
+
<div id="M000435_source" class="dyn-source">
|
157
162
|
<pre>
|
158
|
-
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/accumulate.rb, line
|
163
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/accumulate.rb, line 16</span>
|
159
164
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accumulate</span>
|
160
165
|
<span class="ruby-ivar">@_accumulate</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
161
166
|
<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }.<span class="ruby-identifier">flatten</span>
|
@@ -167,11 +172,11 @@ will return a list of users from all groups.
|
|
167
172
|
</div>
|
168
173
|
<div class="method">
|
169
174
|
<div class="title">
|
170
|
-
<a name="
|
175
|
+
<a name="M000418"></a><b>cluster_by</b>(&b)
|
171
176
|
</div>
|
172
177
|
<div class="description">
|
173
178
|
<p>
|
174
|
-
Similar to <a href="Enumerable.html#
|
179
|
+
Similar to <a href="Enumerable.html#M000419">group_by</a> but returns an
|
175
180
|
array of the groups. Returned elements are sorted by block.
|
176
181
|
</p>
|
177
182
|
<pre>
|
@@ -182,13 +187,14 @@ array of the groups. Returned elements are sorted by block.
|
|
182
187
|
</p>
|
183
188
|
<pre>
|
184
189
|
[ ['a'], ['is'], ['this', 'test'] ]
|
185
|
-
|
186
|
-
CREDIT Erik Veenstra
|
187
190
|
</pre>
|
191
|
+
<p>
|
192
|
+
CREDIT: Erik Veenstra
|
193
|
+
</p>
|
188
194
|
</div>
|
189
195
|
<div class="sourcecode">
|
190
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
191
|
-
<div id="
|
196
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000418_source')" id="l_M000418_source">+</a> ]</p>
|
197
|
+
<div id="M000418_source" class="dyn-source">
|
192
198
|
<pre>
|
193
199
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/cluster_by.rb, line 16</span>
|
194
200
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cluster_by</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -200,7 +206,7 @@ array of the groups. Returned elements are sorted by block.
|
|
200
206
|
</div>
|
201
207
|
<div class="method">
|
202
208
|
<div class="title">
|
203
|
-
<a name="
|
209
|
+
<a name="M000424"></a><b>collect_with_index</b>() {|self[i], i| ...}
|
204
210
|
</div>
|
205
211
|
<div class="description">
|
206
212
|
<p>
|
@@ -209,17 +215,18 @@ Same as collect but with an iteration counter.
|
|
209
215
|
<pre>
|
210
216
|
a = [1,2,3].collect_with_index { |e,i| e*i }
|
211
217
|
a #=> [0,2,6]
|
212
|
-
|
213
|
-
CREDIT: Gavin Sinclair
|
214
218
|
</pre>
|
219
|
+
<p>
|
220
|
+
CREDIT: Gavin Sinclair
|
221
|
+
</p>
|
215
222
|
</div>
|
216
223
|
<div class="aka">
|
217
224
|
This method is also aliased as
|
218
|
-
<a href="Enumerable.html#
|
225
|
+
<a href="Enumerable.html#M000425">map_with_index</a>
|
219
226
|
</div>
|
220
227
|
<div class="sourcecode">
|
221
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
222
|
-
<div id="
|
228
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000424_source')" id="l_M000424_source">+</a> ]</p>
|
229
|
+
<div id="M000424_source" class="dyn-source">
|
223
230
|
<pre>
|
224
231
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/collect.rb, line 10</span>
|
225
232
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_with_index</span>
|
@@ -235,7 +242,7 @@ Same as collect but with an iteration counter.
|
|
235
242
|
</div>
|
236
243
|
<div class="method">
|
237
244
|
<div class="title">
|
238
|
-
<a name="
|
245
|
+
<a name="M000422"></a><b>commonality</b>( &block )
|
239
246
|
</div>
|
240
247
|
<div class="description">
|
241
248
|
<p>
|
@@ -251,13 +258,14 @@ value for Object#hash and if obj1 == obj2.
|
|
251
258
|
|
252
259
|
# Returns all persons that share their last name with another person.
|
253
260
|
persons.collisions { |person| person.last_name }
|
254
|
-
|
255
|
-
CREDIT: Florian Gross
|
256
261
|
</pre>
|
262
|
+
<p>
|
263
|
+
CREDIT: Florian Gross
|
264
|
+
</p>
|
257
265
|
</div>
|
258
266
|
<div class="sourcecode">
|
259
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
260
|
-
<div id="
|
267
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000422_source')" id="l_M000422_source">+</a> ]</p>
|
268
|
+
<div id="M000422_source" class="dyn-source">
|
261
269
|
<pre>
|
262
270
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/commonality.rb, line 17</span>
|
263
271
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
@@ -280,17 +288,17 @@ value for Object#hash and if obj1 == obj2.
|
|
280
288
|
</div>
|
281
289
|
<div class="method">
|
282
290
|
<div class="title">
|
283
|
-
<a name="
|
291
|
+
<a name="M000427"></a><b>compact_collect</b>(trash=nil, &block)
|
284
292
|
</div>
|
285
293
|
<div class="description">
|
286
294
|
<p>
|
287
|
-
Alias for <a href="Enumerable.html#
|
295
|
+
Alias for <a href="Enumerable.html#M000426">compact_map</a>
|
288
296
|
</p>
|
289
297
|
</div>
|
290
298
|
</div>
|
291
299
|
<div class="method">
|
292
300
|
<div class="title">
|
293
|
-
<a name="
|
301
|
+
<a name="M000426"></a><b>compact_map</b>(trash=nil) {|*a| ...}
|
294
302
|
</div>
|
295
303
|
<div class="description">
|
296
304
|
<p>
|
@@ -311,17 +319,17 @@ out in one single step.
|
|
311
319
|
<p>
|
312
320
|
NOTE: Perhaps nicer to have as added functionality for compact.
|
313
321
|
</p>
|
314
|
-
<
|
315
|
-
|
316
|
-
</
|
322
|
+
<p>
|
323
|
+
CREDIT: Trans
|
324
|
+
</p>
|
317
325
|
</div>
|
318
326
|
<div class="aka">
|
319
327
|
This method is also aliased as
|
320
|
-
<a href="Enumerable.html#
|
328
|
+
<a href="Enumerable.html#M000427">compact_collect</a>
|
321
329
|
</div>
|
322
330
|
<div class="sourcecode">
|
323
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
324
|
-
<div id="
|
331
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000426_source')" id="l_M000426_source">+</a> ]</p>
|
332
|
+
<div id="M000426_source" class="dyn-source">
|
325
333
|
<pre>
|
326
334
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/collect.rb, line 37</span>
|
327
335
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compact_map</span>(<span class="ruby-identifier">trash</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -344,7 +352,7 @@ NOTE: Perhaps nicer to have as added functionality for compact.
|
|
344
352
|
</div>
|
345
353
|
<div class="method">
|
346
354
|
<div class="title">
|
347
|
-
<a name="
|
355
|
+
<a name="M000444"></a><b>count</b>(*c)
|
348
356
|
</div>
|
349
357
|
<div class="description">
|
350
358
|
<p>
|
@@ -361,13 +369,14 @@ Count can also handle multiple-valued blocks.
|
|
361
369
|
<pre>
|
362
370
|
e = { 'a' => 2, 'a' => 2, 'b' => 1 }
|
363
371
|
e.count('a',2) #=> 1
|
364
|
-
|
365
|
-
CREDIT: Trans
|
366
372
|
</pre>
|
373
|
+
<p>
|
374
|
+
CREDIT: Trans
|
375
|
+
</p>
|
367
376
|
</div>
|
368
377
|
<div class="sourcecode">
|
369
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
370
|
-
<div id="
|
378
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000444_source')" id="l_M000444_source">+</a> ]</p>
|
379
|
+
<div id="M000444_source" class="dyn-source">
|
371
380
|
<pre>
|
372
381
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/count.rb, line 19</span>
|
373
382
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">c</span>)
|
@@ -379,7 +388,7 @@ Count can also handle multiple-valued blocks.
|
|
379
388
|
</div>
|
380
389
|
<div class="method">
|
381
390
|
<div class="title">
|
382
|
-
<a name="
|
391
|
+
<a name="M000429"></a><b>divide</b>(pattern)
|
383
392
|
</div>
|
384
393
|
<div class="description">
|
385
394
|
<p>
|
@@ -388,13 +397,14 @@ Divide on matching pattern.
|
|
388
397
|
<pre>
|
389
398
|
['a1','b1','a2','b2'].divide(/^a/)
|
390
399
|
=> [['a1,'b1'],['a2','b2']]
|
391
|
-
|
392
|
-
CREDIT: Trans
|
393
400
|
</pre>
|
401
|
+
<p>
|
402
|
+
CREDIT: Trans
|
403
|
+
</p>
|
394
404
|
</div>
|
395
405
|
<div class="sourcecode">
|
396
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
397
|
-
<div id="
|
406
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000429_source')" id="l_M000429_source">+</a> ]</p>
|
407
|
+
<div id="M000429_source" class="dyn-source">
|
398
408
|
<pre>
|
399
409
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/divide.rb, line 10</span>
|
400
410
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divide</span>(<span class="ruby-identifier">pattern</span>)
|
@@ -411,17 +421,17 @@ Divide on matching pattern.
|
|
411
421
|
</div>
|
412
422
|
<div class="method">
|
413
423
|
<div class="title">
|
414
|
-
<a name="
|
424
|
+
<a name="M000432"></a><b>duplicates</b>()
|
415
425
|
</div>
|
416
426
|
<div class="description">
|
417
427
|
<p>
|
418
|
-
Alias for <a href="Enumerable.html#
|
428
|
+
Alias for <a href="Enumerable.html#M000431">nonuniq</a>
|
419
429
|
</p>
|
420
430
|
</div>
|
421
431
|
</div>
|
422
432
|
<div class="method">
|
423
433
|
<div class="title">
|
424
|
-
<a name="
|
434
|
+
<a name="M000445"></a><b>each_by</b>(steps=nil, &block)
|
425
435
|
</div>
|
426
436
|
<div class="description">
|
427
437
|
<p>
|
@@ -441,13 +451,13 @@ the block is used.
|
|
441
451
|
This is just like each_slice, except that it will check the arity of the
|
442
452
|
block. If each_slice ever suppots this this method can be deprecated.
|
443
453
|
</p>
|
444
|
-
<
|
445
|
-
|
446
|
-
</
|
454
|
+
<p>
|
455
|
+
CREDIT: Trans
|
456
|
+
</p>
|
447
457
|
</div>
|
448
458
|
<div class="sourcecode">
|
449
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
450
|
-
<div id="
|
459
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000445_source')" id="l_M000445_source">+</a> ]</p>
|
460
|
+
<div id="M000445_source" class="dyn-source">
|
451
461
|
<pre>
|
452
462
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/each_by.rb, line 22</span>
|
453
463
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_by</span>(<span class="ruby-identifier">steps</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -465,24 +475,25 @@ block. If each_slice ever suppots this this method can be deprecated.
|
|
465
475
|
</div>
|
466
476
|
<div class="method">
|
467
477
|
<div class="title">
|
468
|
-
<a name="
|
478
|
+
<a name="M000439"></a><b>entropy</b>()
|
469
479
|
</div>
|
470
480
|
<div class="description">
|
471
481
|
<p>
|
472
|
-
Shannon‘s <a href="Enumerable.html#
|
482
|
+
Shannon‘s <a href="Enumerable.html#M000439">entropy</a> for an array
|
473
483
|
- returns the average bits per symbol required to encode the array. Lower
|
474
|
-
values mean less "<a href="Enumerable.html#
|
484
|
+
values mean less "<a href="Enumerable.html#M000439">entropy</a>"
|
475
485
|
- i.e. less unique information in the array.
|
476
486
|
</p>
|
477
487
|
<pre>
|
478
488
|
%w{ a b c d e e e }.entropy #=>
|
479
|
-
|
480
|
-
CREDIT: Derek
|
481
489
|
</pre>
|
490
|
+
<p>
|
491
|
+
CREDIT: Derek
|
492
|
+
</p>
|
482
493
|
</div>
|
483
494
|
<div class="sourcecode">
|
484
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
485
|
-
<div id="
|
495
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000439_source')" id="l_M000439_source">+</a> ]</p>
|
496
|
+
<div id="M000439_source" class="dyn-source">
|
486
497
|
<pre>
|
487
498
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/entropy.rb, line 14</span>
|
488
499
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>
|
@@ -500,20 +511,20 @@ values mean less "<a href="Enumerable.html#M000432">entropy</a>"
|
|
500
511
|
</div>
|
501
512
|
<div class="method">
|
502
513
|
<div class="title">
|
503
|
-
<a name="
|
514
|
+
<a name="M000428"></a><b>frequency</b>()
|
504
515
|
</div>
|
505
516
|
<div class="description">
|
506
517
|
<p>
|
507
518
|
Generates a hash mapping each unique symbol in the array to the absolute <a
|
508
|
-
href="Enumerable.html#
|
519
|
+
href="Enumerable.html#M000428">frequency</a> it appears.
|
520
|
+
</p>
|
521
|
+
<p>
|
522
|
+
CREDIT: Brian Schröder
|
509
523
|
</p>
|
510
|
-
<pre>
|
511
|
-
CREDIT: Brian Schröder
|
512
|
-
</pre>
|
513
524
|
</div>
|
514
525
|
<div class="sourcecode">
|
515
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
516
|
-
<div id="
|
526
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000428_source')" id="l_M000428_source">+</a> ]</p>
|
527
|
+
<div id="M000428_source" class="dyn-source">
|
517
528
|
<pre>
|
518
529
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/frequency.rb, line 8</span>
|
519
530
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">frequency</span>
|
@@ -530,21 +541,21 @@ href="Enumerable.html#M000421">frequency</a> it appears.
|
|
530
541
|
</div>
|
531
542
|
<div class="method">
|
532
543
|
<div class="title">
|
533
|
-
<a name="
|
544
|
+
<a name="M000437"></a><b>graph</b>(&yld)
|
534
545
|
</div>
|
535
546
|
<div class="description">
|
536
547
|
<p>
|
537
|
-
Alias for <a href="Enumerable.html#
|
548
|
+
Alias for <a href="Enumerable.html#M000436">mash</a>
|
538
549
|
</p>
|
539
550
|
</div>
|
540
551
|
</div>
|
541
552
|
<div class="method">
|
542
553
|
<div class="title">
|
543
|
-
<a name="
|
554
|
+
<a name="M000419"></a><b>group_by</b>( {|| ...}
|
544
555
|
</div>
|
545
556
|
<div class="description">
|
546
557
|
<p>
|
547
|
-
<a href="Enumerable.html#
|
558
|
+
<a href="Enumerable.html#M000419">group_by</a> is used to group items in a
|
548
559
|
collection by something they have in common. The common factor is the key
|
549
560
|
in the resulting hash, the array of like elements is the value.
|
550
561
|
</p>
|
@@ -554,13 +565,14 @@ in the resulting hash, the array of like elements is the value.
|
|
554
565
|
|
555
566
|
["I had", 1, "dollar and", 50, "cents"].group_by { |e| e.class }
|
556
567
|
#=> { String => ["I had","dollar and","cents"], Fixnum => [1,50] }
|
557
|
-
|
558
|
-
CREDIT: Erik Veenstra
|
559
568
|
</pre>
|
569
|
+
<p>
|
570
|
+
CREDIT: Erik Veenstra
|
571
|
+
</p>
|
560
572
|
</div>
|
561
573
|
<div class="sourcecode">
|
562
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
563
|
-
<div id="
|
574
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000419_source')" id="l_M000419_source">+</a> ]</p>
|
575
|
+
<div id="M000419_source" class="dyn-source">
|
564
576
|
<pre>
|
565
577
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/group_by.rb, line 17</span>
|
566
578
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -575,22 +587,22 @@ in the resulting hash, the array of like elements is the value.
|
|
575
587
|
</div>
|
576
588
|
<div class="method">
|
577
589
|
<div class="title">
|
578
|
-
<a name="
|
590
|
+
<a name="M000440"></a><b>ideal_entropy</b>()
|
579
591
|
</div>
|
580
592
|
<div class="description">
|
581
593
|
<p>
|
582
594
|
Returns the maximum possible Shannon <a
|
583
|
-
href="Enumerable.html#
|
595
|
+
href="Enumerable.html#M000439">entropy</a> of the array with given size
|
584
596
|
assuming that it is an "order-0" source (each element is selected
|
585
597
|
independently of the next).
|
586
598
|
</p>
|
587
|
-
<
|
588
|
-
|
589
|
-
</
|
599
|
+
<p>
|
600
|
+
CREDIT: Derek
|
601
|
+
</p>
|
590
602
|
</div>
|
591
603
|
<div class="sourcecode">
|
592
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
593
|
-
<div id="
|
604
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000440_source')" id="l_M000440_source">+</a> ]</p>
|
605
|
+
<div id="M000440_source" class="dyn-source">
|
594
606
|
<pre>
|
595
607
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/entropy.rb, line 30</span>
|
596
608
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ideal_entropy</span>
|
@@ -604,7 +616,7 @@ independently of the next).
|
|
604
616
|
</div>
|
605
617
|
<div class="method">
|
606
618
|
<div class="title">
|
607
|
-
<a name="
|
619
|
+
<a name="M000430"></a><b>inject!</b>(s) {|k, i| ...}
|
608
620
|
</div>
|
609
621
|
<div class="description">
|
610
622
|
<p>
|
@@ -612,7 +624,7 @@ A small variation of Inject that save one from having to return the
|
|
612
624
|
aggregating or memo argument.
|
613
625
|
</p>
|
614
626
|
<p>
|
615
|
-
Say you want to <a href="Enumerable.html#
|
627
|
+
Say you want to <a href="Enumerable.html#M000444">count</a> letters.
|
616
628
|
</p>
|
617
629
|
<pre>
|
618
630
|
some_text.inject!(Hash.new(0)) {|h,l| h[l] += 1}
|
@@ -622,16 +634,16 @@ vs
|
|
622
634
|
</p>
|
623
635
|
<pre>
|
624
636
|
some_text.inject(Hash.new(0)) {|h,l| h[l] +=1; h}
|
625
|
-
|
626
|
-
CREDIT: David Black
|
627
|
-
CREDIT: Louis J Scoras
|
628
637
|
</pre>
|
638
|
+
<p>
|
639
|
+
CREDIT: David Black, Louis J Scoras
|
640
|
+
</p>
|
629
641
|
</div>
|
630
642
|
<div class="sourcecode">
|
631
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
632
|
-
<div id="
|
643
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000430_source')" id="l_M000430_source">+</a> ]</p>
|
644
|
+
<div id="M000430_source" class="dyn-source">
|
633
645
|
<pre>
|
634
|
-
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/inject.rb, line
|
646
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/inject.rb, line 16</span>
|
635
647
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inject!</span>(<span class="ruby-identifier">s</span>)
|
636
648
|
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">s</span>
|
637
649
|
<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">i</span>) }
|
@@ -643,19 +655,19 @@ vs
|
|
643
655
|
</div>
|
644
656
|
<div class="method">
|
645
657
|
<div class="title">
|
646
|
-
<a name="
|
658
|
+
<a name="M000442"></a><b>map_send</b>(meth, *args, &block)
|
647
659
|
</div>
|
648
660
|
<div class="description">
|
649
661
|
<p>
|
650
662
|
Send a message to each element and collect the result.
|
651
663
|
</p>
|
652
|
-
<
|
653
|
-
|
654
|
-
</
|
664
|
+
<p>
|
665
|
+
CREDIT: Sean O‘Halpin
|
666
|
+
</p>
|
655
667
|
</div>
|
656
668
|
<div class="sourcecode">
|
657
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
658
|
-
<div id="
|
669
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000442_source')" id="l_M000442_source">+</a> ]</p>
|
670
|
+
<div id="M000442_source" class="dyn-source">
|
659
671
|
<pre>
|
660
672
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/map_send.rb, line 7</span>
|
661
673
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">map_send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -667,17 +679,17 @@ Send a message to each element and collect the result.
|
|
667
679
|
</div>
|
668
680
|
<div class="method">
|
669
681
|
<div class="title">
|
670
|
-
<a name="
|
682
|
+
<a name="M000425"></a><b>map_with_index</b>()
|
671
683
|
</div>
|
672
684
|
<div class="description">
|
673
685
|
<p>
|
674
|
-
Alias for <a href="Enumerable.html#
|
686
|
+
Alias for <a href="Enumerable.html#M000424">collect_with_index</a>
|
675
687
|
</p>
|
676
688
|
</div>
|
677
689
|
</div>
|
678
690
|
<div class="method">
|
679
691
|
<div class="title">
|
680
|
-
<a name="
|
692
|
+
<a name="M000436"></a><b>mash</b>(&yld)
|
681
693
|
</div>
|
682
694
|
<div class="description">
|
683
695
|
<p>
|
@@ -691,21 +703,22 @@ key and the value for the new hash.
|
|
691
703
|
sq_roots = numbers.mash { |n| [n*n, n] } # { 1=>1, 4=>2, 9=>3 }
|
692
704
|
</pre>
|
693
705
|
<p>
|
694
|
-
|
706
|
+
The name "<a href="Enumerable.html#M000436">mash</a>" stands for
|
707
|
+
"map hash".
|
695
708
|
</p>
|
696
709
|
<p>
|
697
|
-
|
710
|
+
CREDIT: Andrew Dudzik (adudzik), Trans
|
698
711
|
</p>
|
699
712
|
</div>
|
700
713
|
<div class="aka">
|
701
714
|
This method is also aliased as
|
702
|
-
<a href="Enumerable.html#
|
715
|
+
<a href="Enumerable.html#M000437">graph</a>
|
703
716
|
</div>
|
704
717
|
<div class="sourcecode">
|
705
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
706
|
-
<div id="
|
718
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000436_source')" id="l_M000436_source">+</a> ]</p>
|
719
|
+
<div id="M000436_source" class="dyn-source">
|
707
720
|
<pre>
|
708
|
-
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/mash.rb, line
|
721
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/mash.rb, line 14</span>
|
709
722
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mash</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
710
723
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">yld</span>
|
711
724
|
<span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">kv</span><span class="ruby-operator">|</span> <span class="ruby-comment cmt"># Used to be inject({}) do |h,kv|</span>
|
@@ -724,20 +737,20 @@ NOTE: Would correlate would be better?
|
|
724
737
|
</div>
|
725
738
|
<div class="method">
|
726
739
|
<div class="title">
|
727
|
-
<a name="
|
740
|
+
<a name="M000421"></a><b>mode</b>()
|
728
741
|
</div>
|
729
742
|
<div class="description">
|
730
743
|
<p>
|
731
|
-
In Statistics <a href="Enumerable.html#
|
744
|
+
In Statistics <a href="Enumerable.html#M000421">mode</a> is the value that
|
732
745
|
occurs most frequently in a given set of data.
|
733
746
|
</p>
|
734
|
-
<
|
735
|
-
|
736
|
-
</
|
747
|
+
<p>
|
748
|
+
CREDIT: Robert Klemme
|
749
|
+
</p>
|
737
750
|
</div>
|
738
751
|
<div class="sourcecode">
|
739
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
740
|
-
<div id="
|
752
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000421_source')" id="l_M000421_source">+</a> ]</p>
|
753
|
+
<div id="M000421_source" class="dyn-source">
|
741
754
|
<pre>
|
742
755
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/mode.rb, line 8</span>
|
743
756
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mode</span>
|
@@ -752,26 +765,26 @@ occurs most frequently in a given set of data.
|
|
752
765
|
</div>
|
753
766
|
<div class="method">
|
754
767
|
<div class="title">
|
755
|
-
<a name="
|
768
|
+
<a name="M000438"></a><b>modulate</b>(modulo)
|
756
769
|
</div>
|
757
770
|
<div class="description">
|
758
771
|
<p>
|
759
772
|
Modulate. Divide an array into groups by modulo of the index.
|
760
773
|
</p>
|
761
774
|
<p>
|
762
|
-
[2,4,6,8].<a href="Enumerable.html#
|
775
|
+
[2,4,6,8].<a href="Enumerable.html#M000438">modulate</a>(2) #=>
|
763
776
|
[[2,6],[4,8]]
|
764
777
|
</p>
|
765
|
-
<pre>
|
766
|
-
CREDIT: Trans
|
767
|
-
</pre>
|
768
778
|
<p>
|
769
|
-
|
779
|
+
CREDIT: Trans
|
780
|
+
</p>
|
781
|
+
<p>
|
782
|
+
NOTE: Would the better name for this be ‘collate’?
|
770
783
|
</p>
|
771
784
|
</div>
|
772
785
|
<div class="sourcecode">
|
773
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
774
|
-
<div id="
|
786
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000438_source')" id="l_M000438_source">+</a> ]</p>
|
787
|
+
<div id="M000438_source" class="dyn-source">
|
775
788
|
<pre>
|
776
789
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/modulate.rb, line 11</span>
|
777
790
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">modulate</span>(<span class="ruby-identifier">modulo</span>)
|
@@ -789,7 +802,7 @@ NOTE: Would this be better named ‘collate’?
|
|
789
802
|
</div>
|
790
803
|
<div class="method">
|
791
804
|
<div class="title">
|
792
|
-
<a name="
|
805
|
+
<a name="M000433"></a><b>none?</b>( {|e| ...}
|
793
806
|
</div>
|
794
807
|
<div class="description">
|
795
808
|
<p>
|
@@ -808,13 +821,14 @@ only if <em>none</em> of the elements have a true value (i.e. not
|
|
808
821
|
[5,8,9].none? # false
|
809
822
|
(1...10).none? { |n| n < 0 } # true
|
810
823
|
(1...10).none? { |n| n > 0 } # false
|
811
|
-
|
812
|
-
CREDIT: Gavin Sinclair
|
813
824
|
</pre>
|
825
|
+
<p>
|
826
|
+
CREDIT: Gavin Sinclair
|
827
|
+
</p>
|
814
828
|
</div>
|
815
829
|
<div class="sourcecode">
|
816
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
817
|
-
<div id="
|
830
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000433_source')" id="l_M000433_source">+</a> ]</p>
|
831
|
+
<div id="M000433_source" class="dyn-source">
|
818
832
|
<pre>
|
819
833
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/none.rb, line 21</span>
|
820
834
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">none?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
@@ -830,7 +844,7 @@ only if <em>none</em> of the elements have a true value (i.e. not
|
|
830
844
|
</div>
|
831
845
|
<div class="method">
|
832
846
|
<div class="title">
|
833
|
-
<a name="
|
847
|
+
<a name="M000431"></a><b>nonuniq</b>()
|
834
848
|
</div>
|
835
849
|
<div class="description">
|
836
850
|
<p>
|
@@ -838,17 +852,18 @@ Returns a list on non-unique,
|
|
838
852
|
</p>
|
839
853
|
<pre>
|
840
854
|
[1,1,2,2,3,4,5].nonuniq #=> [1,2]
|
841
|
-
|
842
|
-
CREDIT: Martin DeMello
|
843
855
|
</pre>
|
856
|
+
<p>
|
857
|
+
CREDIT: Martin DeMello
|
858
|
+
</p>
|
844
859
|
</div>
|
845
860
|
<div class="aka">
|
846
861
|
This method is also aliased as
|
847
|
-
<a href="Enumerable.html#
|
862
|
+
<a href="Enumerable.html#M000432">duplicates</a>
|
848
863
|
</div>
|
849
864
|
<div class="sourcecode">
|
850
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
851
|
-
<div id="
|
865
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000431_source')" id="l_M000431_source">+</a> ]</p>
|
866
|
+
<div id="M000431_source" class="dyn-source">
|
852
867
|
<pre>
|
853
868
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/duplicates.rb, line 9</span>
|
854
869
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq</span>
|
@@ -866,12 +881,12 @@ Returns a list on non-unique,
|
|
866
881
|
</div>
|
867
882
|
<div class="method">
|
868
883
|
<div class="title">
|
869
|
-
<a name="
|
884
|
+
<a name="M000423"></a><b>occur</b>(n=nil) {|| ...}
|
870
885
|
</div>
|
871
886
|
<div class="description">
|
872
887
|
<p>
|
873
888
|
Returns an array of elements for the elements that <a
|
874
|
-
href="Enumerable.html#
|
889
|
+
href="Enumerable.html#M000423">occur</a> n times. Or according to the
|
875
890
|
results of a given block.
|
876
891
|
</p>
|
877
892
|
<pre>
|
@@ -884,15 +899,13 @@ results of a given block.
|
|
884
899
|
|
885
900
|
[1,1,2,3,3,4,5,5].occur { |n| n == 1 } #=> [2,4]
|
886
901
|
[1,1,2,3,3,4,5,5].occur { |n| n > 1 } #=> [1,3,5]
|
887
|
-
|
888
|
-
CREDIT: ?
|
889
902
|
</pre>
|
890
903
|
</div>
|
891
904
|
<div class="sourcecode">
|
892
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
893
|
-
<div id="
|
905
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000423_source')" id="l_M000423_source">+</a> ]</p>
|
906
|
+
<div id="M000423_source" class="dyn-source">
|
894
907
|
<pre>
|
895
|
-
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/occur.rb, line
|
908
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/occur.rb, line 16</span>
|
896
909
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">occur</span>(<span class="ruby-identifier">n</span>=<span class="ruby-keyword kw">nil</span>) <span class="ruby-comment cmt">#:yield:</span>
|
897
910
|
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> }
|
898
911
|
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
@@ -917,7 +930,7 @@ results of a given block.
|
|
917
930
|
</div>
|
918
931
|
<div class="method">
|
919
932
|
<div class="title">
|
920
|
-
<a name="
|
933
|
+
<a name="M000417"></a><b>one?</b>( {|e| ...}
|
921
934
|
</div>
|
922
935
|
<div class="description">
|
923
936
|
<p>
|
@@ -936,13 +949,14 @@ only if <em>exactly one</em> element has a true value (i.e. not
|
|
936
949
|
[5,8,9].one? # false
|
937
950
|
(1...10).one? { |n| n == 5 } # true
|
938
951
|
(1...10).one? { |n| n < 5 } # false
|
939
|
-
|
940
|
-
CREDIT: Gavin Sinclair
|
941
952
|
</pre>
|
953
|
+
<p>
|
954
|
+
CREDIT: Gavin Sinclair
|
955
|
+
</p>
|
942
956
|
</div>
|
943
957
|
<div class="sourcecode">
|
944
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
945
|
-
<div id="
|
958
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000417_source')" id="l_M000417_source">+</a> ]</p>
|
959
|
+
<div id="M000417_source" class="dyn-source">
|
946
960
|
<pre>
|
947
961
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/one.rb, line 21</span>
|
948
962
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
@@ -965,21 +979,21 @@ only if <em>exactly one</em> element has a true value (i.e. not
|
|
965
979
|
</div>
|
966
980
|
<div class="method">
|
967
981
|
<div class="title">
|
968
|
-
<a name="
|
982
|
+
<a name="M000443"></a><b>probability</b>()
|
969
983
|
</div>
|
970
984
|
<div class="description">
|
971
985
|
<p>
|
972
986
|
Generates a hash mapping each unique element in the array to the relative
|
973
|
-
<a href="Enumerable.html#
|
987
|
+
<a href="Enumerable.html#M000428">frequency</a>, i.e. the probablity, of it
|
974
988
|
appearence.
|
975
989
|
</p>
|
976
|
-
<
|
977
|
-
|
978
|
-
</
|
990
|
+
<p>
|
991
|
+
CREDIT: Brian Schröder
|
992
|
+
</p>
|
979
993
|
</div>
|
980
994
|
<div class="sourcecode">
|
981
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
982
|
-
<div id="
|
995
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000443_source')" id="l_M000443_source">+</a> ]</p>
|
996
|
+
<div id="M000443_source" class="dyn-source">
|
983
997
|
<pre>
|
984
998
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/probability.rb, line 9</span>
|
985
999
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">probability</span>
|
@@ -998,12 +1012,12 @@ appearence.
|
|
998
1012
|
</div>
|
999
1013
|
<div class="method">
|
1000
1014
|
<div class="title">
|
1001
|
-
<a name="
|
1015
|
+
<a name="M000441"></a><b>split</b>(pattern)
|
1002
1016
|
</div>
|
1003
1017
|
<div class="description">
|
1004
1018
|
<p>
|
1005
1019
|
Split on matching pattern. Unlike <a
|
1006
|
-
href="Enumerable.html#
|
1020
|
+
href="Enumerable.html#M000429">divide</a> this does not include matching
|
1007
1021
|
elements.
|
1008
1022
|
</p>
|
1009
1023
|
<pre>
|
@@ -1015,8 +1029,8 @@ CREDIT: Trans
|
|
1015
1029
|
</p>
|
1016
1030
|
</div>
|
1017
1031
|
<div class="sourcecode">
|
1018
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1019
|
-
<div id="
|
1032
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000441_source')" id="l_M000441_source">+</a> ]</p>
|
1033
|
+
<div id="M000441_source" class="dyn-source">
|
1020
1034
|
<pre>
|
1021
1035
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/split.rb, line 10</span>
|
1022
1036
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">split</span>(<span class="ruby-identifier">pattern</span>)
|
@@ -1040,11 +1054,11 @@ CREDIT: Trans
|
|
1040
1054
|
</div>
|
1041
1055
|
<div class="method">
|
1042
1056
|
<div class="title">
|
1043
|
-
<a name="
|
1057
|
+
<a name="M000420"></a><b>sum</b>(identity = 0, &block)
|
1044
1058
|
</div>
|
1045
1059
|
<div class="description">
|
1046
1060
|
<p>
|
1047
|
-
Uses #+ to <a href="Enumerable.html#
|
1061
|
+
Uses #+ to <a href="Enumerable.html#M000420">sum</a> the enumerated
|
1048
1062
|
elements.
|
1049
1063
|
</p>
|
1050
1064
|
<pre>
|
@@ -1053,8 +1067,8 @@ elements.
|
|
1053
1067
|
</pre>
|
1054
1068
|
</div>
|
1055
1069
|
<div class="sourcecode">
|
1056
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1057
|
-
<div id="
|
1070
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000420_source')" id="l_M000420_source">+</a> ]</p>
|
1071
|
+
<div id="M000420_source" class="dyn-source">
|
1058
1072
|
<pre>
|
1059
1073
|
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/sum.rb, line 8</span>
|
1060
1074
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sum</span>(<span class="ruby-identifier">identity</span> = <span class="ruby-value">0</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1070,7 +1084,35 @@ elements.
|
|
1070
1084
|
</div>
|
1071
1085
|
<div class="method">
|
1072
1086
|
<div class="title">
|
1073
|
-
<a name="
|
1087
|
+
<a name="M000416"></a><b>take</b>(n)
|
1088
|
+
</div>
|
1089
|
+
<div class="description">
|
1090
|
+
<p>
|
1091
|
+
Return the first n items from the collection
|
1092
|
+
</p>
|
1093
|
+
</div>
|
1094
|
+
<div class="sourcecode">
|
1095
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000416_source')" id="l_M000416_source">+</a> ]</p>
|
1096
|
+
<div id="M000416_source" class="dyn-source">
|
1097
|
+
<pre>
|
1098
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/take.rb, line 7</span>
|
1099
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take</span>(<span class="ruby-identifier">n</span>)
|
1100
|
+
<span class="ruby-identifier">res</span> = []
|
1101
|
+
<span class="ruby-identifier">count</span> = <span class="ruby-value">0</span>
|
1102
|
+
<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
1103
|
+
<span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">>=</span> <span class="ruby-identifier">n</span>
|
1104
|
+
<span class="ruby-identifier">res</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">e</span>
|
1105
|
+
<span class="ruby-identifier">count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1106
|
+
<span class="ruby-keyword kw">end</span>
|
1107
|
+
<span class="ruby-identifier">res</span>
|
1108
|
+
<span class="ruby-keyword kw">end</span>
|
1109
|
+
</pre>
|
1110
|
+
</div>
|
1111
|
+
</div>
|
1112
|
+
</div>
|
1113
|
+
<div class="method">
|
1114
|
+
<div class="title">
|
1115
|
+
<a name="M000415"></a><b>to_h</b>(arrayed=nil)
|
1074
1116
|
</div>
|
1075
1117
|
<div class="description">
|
1076
1118
|
<p>
|
@@ -1082,8 +1124,8 @@ CREDIT: Trans
|
|
1082
1124
|
</p>
|
1083
1125
|
</div>
|
1084
1126
|
<div class="sourcecode">
|
1085
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1086
|
-
<div id="
|
1127
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000415_source')" id="l_M000415_source">+</a> ]</p>
|
1128
|
+
<div id="M000415_source" class="dyn-source">
|
1087
1129
|
<pre>
|
1088
1130
|
<span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 65</span>
|
1089
1131
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>(<span class="ruby-identifier">arrayed</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -1095,7 +1137,7 @@ CREDIT: Trans
|
|
1095
1137
|
</div>
|
1096
1138
|
<div class="method">
|
1097
1139
|
<div class="title">
|
1098
|
-
<a name="
|
1140
|
+
<a name="M000434"></a><b>uniq_by</b>( {|| ...}
|
1099
1141
|
</div>
|
1100
1142
|
<div class="description">
|
1101
1143
|
<p>
|
@@ -1109,15 +1151,13 @@ produces
|
|
1109
1151
|
</p>
|
1110
1152
|
<pre>
|
1111
1153
|
[-5, -4, -3, -2, -1, 0]
|
1112
|
-
|
1113
|
-
CREDIT: ?
|
1114
1154
|
</pre>
|
1115
1155
|
</div>
|
1116
1156
|
<div class="sourcecode">
|
1117
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1118
|
-
<div id="
|
1157
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000434_source')" id="l_M000434_source">+</a> ]</p>
|
1158
|
+
<div id="M000434_source" class="dyn-source">
|
1119
1159
|
<pre>
|
1120
|
-
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/uniq_by.rb, line
|
1160
|
+
<span class="ruby-comment cmt"># File lib/core/facets/enumerable/uniq_by.rb, line 11</span>
|
1121
1161
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uniq_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
1122
1162
|
<span class="ruby-identifier">h</span> = {}; <span class="ruby-identifier">inject</span>([]) {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)] <span class="ruby-operator">||=</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">x</span>}
|
1123
1163
|
<span class="ruby-keyword kw">end</span>
|