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
@@ -73,7 +73,7 @@
|
|
73
73
|
|
74
74
|
|
75
75
|
<div class="sectiontitle">Methods</div>
|
76
|
-
<span style="padding-right: 5px;"><a href="#
|
76
|
+
<span style="padding-right: 5px;"><a href="#M000342">root?</a></span>
|
77
77
|
|
78
78
|
|
79
79
|
|
@@ -83,19 +83,19 @@
|
|
83
83
|
<div class="sectiontitle">Public Instance methods</div>
|
84
84
|
<div class="method">
|
85
85
|
<div class="title">
|
86
|
-
<a name="
|
86
|
+
<a name="M000342"></a><b>root?</b>(dir=nil)
|
87
87
|
</div>
|
88
88
|
<div class="description">
|
89
89
|
<p>
|
90
90
|
Is the specified directory the root directory?
|
91
91
|
</p>
|
92
|
-
<
|
93
|
-
|
94
|
-
</
|
92
|
+
<p>
|
93
|
+
CREDIT: Jeffrey Schwab
|
94
|
+
</p>
|
95
95
|
</div>
|
96
96
|
<div class="sourcecode">
|
97
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
98
|
-
<div id="
|
97
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000342_source')" id="l_M000342_source">+</a> ]</p>
|
98
|
+
<div id="M000342_source" class="dyn-source">
|
99
99
|
<pre>
|
100
100
|
<span class="ruby-comment cmt"># File lib/core/facets/filetest/root.rb, line 9</span>
|
101
101
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root?</span>(<span class="ruby-identifier">dir</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -81,8 +81,8 @@ Object
|
|
81
81
|
|
82
82
|
|
83
83
|
<div class="sectiontitle">Methods</div>
|
84
|
-
<span style="padding-right: 5px;"><a href="#
|
85
|
-
<span style="padding-right: 5px;"><a href="#
|
84
|
+
<span style="padding-right: 5px;"><a href="#M000206">round_at</a></span>
|
85
|
+
<span style="padding-right: 5px;"><a href="#M000207">round_to</a></span>
|
86
86
|
|
87
87
|
|
88
88
|
|
@@ -92,7 +92,7 @@ Object
|
|
92
92
|
<div class="sectiontitle">Public Instance methods</div>
|
93
93
|
<div class="method">
|
94
94
|
<div class="title">
|
95
|
-
<a name="
|
95
|
+
<a name="M000206"></a><b>round_at</b>( d )
|
96
96
|
</div>
|
97
97
|
<div class="description">
|
98
98
|
<p>
|
@@ -103,15 +103,16 @@ Rounds to the given decimal position.
|
|
103
103
|
4.555.round_at(1) #=> 4.6
|
104
104
|
4.555.round_at(2) #=> 4.56
|
105
105
|
4.555.round_at(3) #=> 4.555
|
106
|
-
|
107
|
-
CREDIT: Trans
|
108
106
|
</pre>
|
107
|
+
<p>
|
108
|
+
CREDIT: Trans
|
109
|
+
</p>
|
109
110
|
</div>
|
110
111
|
<div class="sourcecode">
|
111
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
112
|
-
<div id="
|
112
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000206_source')" id="l_M000206_source">+</a> ]</p>
|
113
|
+
<div id="M000206_source" class="dyn-source">
|
113
114
|
<pre>
|
114
|
-
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line
|
115
|
+
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 50</span>
|
115
116
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>( <span class="ruby-identifier">d</span> ) <span class="ruby-comment cmt">#d=0</span>
|
116
117
|
(<span class="ruby-keyword kw">self</span> <span class="ruby-operator">*</span> (<span class="ruby-value">10.0</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">d</span>)).<span class="ruby-identifier">round</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> (<span class="ruby-value">10.0</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">d</span>)
|
117
118
|
<span class="ruby-keyword kw">end</span>
|
@@ -121,7 +122,7 @@ Rounds to the given decimal position.
|
|
121
122
|
</div>
|
122
123
|
<div class="method">
|
123
124
|
<div class="title">
|
124
|
-
<a name="
|
125
|
+
<a name="M000207"></a><b>round_to</b>( n )
|
125
126
|
</div>
|
126
127
|
<div class="description">
|
127
128
|
<p>
|
@@ -132,15 +133,16 @@ Rounds to the nearest _n_th degree.
|
|
132
133
|
4.555.round_to(0.1) #=> 4.6
|
133
134
|
4.555.round_to(0.01) #=> 4.56
|
134
135
|
4.555.round_to(0) #=> 4.555
|
135
|
-
|
136
|
-
CREDIT: Trans
|
137
136
|
</pre>
|
137
|
+
<p>
|
138
|
+
CREDIT: Trans
|
139
|
+
</p>
|
138
140
|
</div>
|
139
141
|
<div class="sourcecode">
|
140
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
141
|
-
<div id="
|
142
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000207_source')" id="l_M000207_source">+</a> ]</p>
|
143
|
+
<div id="M000207_source" class="dyn-source">
|
142
144
|
<pre>
|
143
|
-
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line
|
145
|
+
<span class="ruby-comment cmt"># File lib/core/facets/numeric/round.rb, line 63</span>
|
144
146
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>( <span class="ruby-identifier">n</span> ) <span class="ruby-comment cmt">#n=1</span>
|
145
147
|
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
146
148
|
(<span class="ruby-keyword kw">self</span> <span class="ruby-operator">*</span> (<span class="ruby-value">1.0</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n</span>)).<span class="ruby-identifier">round</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> (<span class="ruby-value">1.0</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n</span>)
|
@@ -99,9 +99,9 @@ accorrding to the operation applied to it.
|
|
99
99
|
|
100
100
|
|
101
101
|
<div class="sectiontitle">Methods</div>
|
102
|
-
<span style="padding-right: 5px;"><a href="#
|
103
|
-
<span style="padding-right: 5px;"><a href="#
|
104
|
-
<span style="padding-right: 5px;"><a href="#
|
102
|
+
<span style="padding-right: 5px;"><a href="#M000223">method_missing</a></span>
|
103
|
+
<span style="padding-right: 5px;"><a href="#M000221">new</a></span>
|
104
|
+
<span style="padding-right: 5px;"><a href="#M000222">to_proc</a></span>
|
105
105
|
|
106
106
|
|
107
107
|
|
@@ -111,11 +111,11 @@ accorrding to the operation applied to it.
|
|
111
111
|
<div class="sectiontitle">Public Class methods</div>
|
112
112
|
<div class="method">
|
113
113
|
<div class="title">
|
114
|
-
<a name="
|
114
|
+
<a name="M000221"></a><b>new</b>(&function)
|
115
115
|
</div>
|
116
116
|
<div class="sourcecode">
|
117
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
118
|
-
<div id="
|
117
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000221_source')" id="l_M000221_source">+</a> ]</p>
|
118
|
+
<div id="M000221_source" class="dyn-source">
|
119
119
|
<pre>
|
120
120
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 63</span>
|
121
121
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">function</span>)
|
@@ -128,7 +128,7 @@ accorrding to the operation applied to it.
|
|
128
128
|
<div class="sectiontitle">Public Instance methods</div>
|
129
129
|
<div class="method">
|
130
130
|
<div class="title">
|
131
|
-
<a name="
|
131
|
+
<a name="M000223"></a><b>method_missing</b>(op, *args, &blk)
|
132
132
|
</div>
|
133
133
|
<div class="description">
|
134
134
|
<p>
|
@@ -136,8 +136,8 @@ Any action against the functor is processesd by the function.
|
|
136
136
|
</p>
|
137
137
|
</div>
|
138
138
|
<div class="sourcecode">
|
139
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
140
|
-
<div id="
|
139
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000223_source')" id="l_M000223_source">+</a> ]</p>
|
140
|
+
<div id="M000223_source" class="dyn-source">
|
141
141
|
<pre>
|
142
142
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 72</span>
|
143
143
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -149,11 +149,11 @@ Any action against the functor is processesd by the function.
|
|
149
149
|
</div>
|
150
150
|
<div class="method">
|
151
151
|
<div class="title">
|
152
|
-
<a name="
|
152
|
+
<a name="M000222"></a><b>to_proc</b>()
|
153
153
|
</div>
|
154
154
|
<div class="sourcecode">
|
155
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
156
|
-
<div id="
|
155
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000222_source')" id="l_M000222_source">+</a> ]</p>
|
156
|
+
<div id="M000222_source" class="dyn-source">
|
157
157
|
<pre>
|
158
158
|
<span class="ruby-comment cmt"># File lib/core/facets/functor.rb, line 67</span>
|
159
159
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
|
@@ -58,8 +58,9 @@
|
|
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/hash/zipnew_rb.html">lib/core/facets/hash/zipnew.rb</a>
|
62
|
+
<a href="../files/lib/core/facets/hash/update_values_rb.html">lib/core/facets/hash/update_values.rb</a>
|
61
63
|
<a href="../files/lib/core/facets/hash/alias_rb.html">lib/core/facets/hash/alias.rb</a>
|
62
|
-
<a href="../files/lib/core/facets/hash/update_rb.html">lib/core/facets/hash/update.rb</a>
|
63
64
|
<a href="../files/lib/core/facets/hash/autonew_rb.html">lib/core/facets/hash/autonew.rb</a>
|
64
65
|
<a href="../files/lib/core/facets/hash/recursively_rb.html">lib/core/facets/hash/recursively.rb</a>
|
65
66
|
<a href="../files/lib/core/facets/hash/op_and_rb.html">lib/core/facets/hash/op_and.rb</a>
|
@@ -83,10 +84,14 @@
|
|
83
84
|
<a href="../files/lib/core/facets/hash/weave_rb.html">lib/core/facets/hash/weave.rb</a>
|
84
85
|
<a href="../files/lib/core/facets/hash/swap_rb.html">lib/core/facets/hash/swap.rb</a>
|
85
86
|
<a href="../files/lib/core/facets/hash/to_struct_rb.html">lib/core/facets/hash/to_struct.rb</a>
|
87
|
+
<a href="../files/lib/core/facets/hash/symbolize_keys_rb.html">lib/core/facets/hash/symbolize_keys.rb</a>
|
86
88
|
<a href="../files/lib/core/facets/hash/join_rb.html">lib/core/facets/hash/join.rb</a>
|
89
|
+
<a href="../files/lib/core/facets/hash/replace_each_rb.html">lib/core/facets/hash/replace_each.rb</a>
|
87
90
|
<a href="../files/lib/core/facets/hash/slice_rb.html">lib/core/facets/hash/slice.rb</a>
|
88
91
|
<a href="../files/lib/core/facets/hash/op_add_rb.html">lib/core/facets/hash/op_add.rb</a>
|
89
92
|
<a href="../files/lib/core/facets/hash/rekey_rb.html">lib/core/facets/hash/rekey.rb</a>
|
93
|
+
<a href="../files/lib/core/facets/hash/update_each_rb.html">lib/core/facets/hash/update_each.rb</a>
|
94
|
+
<a href="../files/lib/core/facets/hash/update_keys_rb.html">lib/core/facets/hash/update_keys.rb</a>
|
90
95
|
<a href="../files/lib/core/facets/hash/argumentize_rb.html">lib/core/facets/hash/argumentize.rb</a>
|
91
96
|
<a href="../files/lib/core/facets/hash/at_rb.html">lib/core/facets/hash/at.rb</a>
|
92
97
|
<a href="../files/lib/core/facets/blank_rb.html">lib/core/facets/blank.rb</a>
|
@@ -113,58 +118,62 @@ Object
|
|
113
118
|
|
114
119
|
|
115
120
|
<div class="sectiontitle">Methods</div>
|
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="#
|
129
|
-
<span style="padding-right: 5px;"><a href="#
|
130
|
-
<span style="padding-right: 5px;"><a href="#
|
131
|
-
<span style="padding-right: 5px;"><a href="#
|
132
|
-
<span style="padding-right: 5px;"><a href="#
|
133
|
-
<span style="padding-right: 5px;"><a href="#
|
134
|
-
<span style="padding-right: 5px;"><a href="#
|
135
|
-
<span style="padding-right: 5px;"><a href="#
|
136
|
-
<span style="padding-right: 5px;"><a href="#
|
137
|
-
<span style="padding-right: 5px;"><a href="#
|
138
|
-
<span style="padding-right: 5px;"><a href="#
|
139
|
-
<span style="padding-right: 5px;"><a href="#
|
140
|
-
<span style="padding-right: 5px;"><a href="#
|
141
|
-
<span style="padding-right: 5px;"><a href="#
|
142
|
-
<span style="padding-right: 5px;"><a href="#
|
143
|
-
<span style="padding-right: 5px;"><a href="#
|
144
|
-
<span style="padding-right: 5px;"><a href="#
|
145
|
-
<span style="padding-right: 5px;"><a href="#
|
146
|
-
<span style="padding-right: 5px;"><a href="#
|
147
|
-
<span style="padding-right: 5px;"><a href="#
|
148
|
-
<span style="padding-right: 5px;"><a href="#
|
149
|
-
<span style="padding-right: 5px;"><a href="#
|
150
|
-
<span style="padding-right: 5px;"><a href="#
|
151
|
-
<span style="padding-right: 5px;"><a href="#
|
152
|
-
<span style="padding-right: 5px;"><a href="#
|
153
|
-
<span style="padding-right: 5px;"><a href="#
|
154
|
-
<span style="padding-right: 5px;"><a href="#
|
155
|
-
<span style="padding-right: 5px;"><a href="#
|
121
|
+
<span style="padding-right: 5px;"><a href="#M000082">&</a></span>
|
122
|
+
<span style="padding-right: 5px;"><a href="#M000097">*</a></span>
|
123
|
+
<span style="padding-right: 5px;"><a href="#M000125">+</a></span>
|
124
|
+
<span style="padding-right: 5px;"><a href="#M000083">-</a></span>
|
125
|
+
<span style="padding-right: 5px;"><a href="#M000098"><<</a></span>
|
126
|
+
<span style="padding-right: 5px;"><a href="#M000078">alias!</a></span>
|
127
|
+
<span style="padding-right: 5px;"><a href="#M000130">argumentize</a></span>
|
128
|
+
<span style="padding-right: 5px;"><a href="#M000079">autonew</a></span>
|
129
|
+
<span style="padding-right: 5px;"><a href="#M000109">collate</a></span>
|
130
|
+
<span style="padding-right: 5px;"><a href="#M000110">collate!</a></span>
|
131
|
+
<span style="padding-right: 5px;"><a href="#M000111">delete_unless</a></span>
|
132
|
+
<span style="padding-right: 5px;"><a href="#M000112">delete_values</a></span>
|
133
|
+
<span style="padding-right: 5px;"><a href="#M000113">delete_values_at</a></span>
|
134
|
+
<span style="padding-right: 5px;"><a href="#M000106">diff</a></span>
|
135
|
+
<span style="padding-right: 5px;"><a href="#M000090">each_with_key</a></span>
|
136
|
+
<span style="padding-right: 5px;"><a href="#M000084">except</a></span>
|
137
|
+
<span style="padding-right: 5px;"><a href="#M000085">except!</a></span>
|
138
|
+
<span style="padding-right: 5px;"><a href="#M000108">graph!</a></span>
|
139
|
+
<span style="padding-right: 5px;"><a href="#M000086">has_keys?</a></span>
|
140
|
+
<span style="padding-right: 5px;"><a href="#M000088">has_only_keys?</a></span>
|
141
|
+
<span style="padding-right: 5px;"><a href="#M000104">insert</a></span>
|
142
|
+
<span style="padding-right: 5px;"><a href="#M000099">inverse</a></span>
|
143
|
+
<span style="padding-right: 5px;"><a href="#M000121">join</a></span>
|
144
|
+
<span style="padding-right: 5px;"><a href="#M000087">keys?</a></span>
|
145
|
+
<span style="padding-right: 5px;"><a href="#M000107">mash!</a></span>
|
146
|
+
<span style="padding-right: 5px;"><a href="#M000089">only_keys?</a></span>
|
147
|
+
<span style="padding-right: 5px;"><a href="#M000100">recursive_merge</a></span>
|
148
|
+
<span style="padding-right: 5px;"><a href="#M000101">recursive_merge!</a></span>
|
149
|
+
<span style="padding-right: 5px;"><a href="#M000080">recursively</a></span>
|
150
|
+
<span style="padding-right: 5px;"><a href="#M000081">recursively!</a></span>
|
151
|
+
<span style="padding-right: 5px;"><a href="#M000126">rekey</a></span>
|
152
|
+
<span style="padding-right: 5px;"><a href="#M000127">rekey!</a></span>
|
153
|
+
<span style="padding-right: 5px;"><a href="#M000122">replace_each</a></span>
|
154
|
+
<span style="padding-right: 5px;"><a href="#M000091">reverse_merge</a></span>
|
155
|
+
<span style="padding-right: 5px;"><a href="#M000092">reverse_merge!</a></span>
|
156
|
+
<span style="padding-right: 5px;"><a href="#M000093">reverse_update</a></span>
|
157
|
+
<span style="padding-right: 5px;"><a href="#M000105">select!</a></span>
|
158
|
+
<span style="padding-right: 5px;"><a href="#M000123">slice</a></span>
|
159
|
+
<span style="padding-right: 5px;"><a href="#M000124">slice!</a></span>
|
160
|
+
<span style="padding-right: 5px;"><a href="#M000119">stringify_keys</a></span>
|
161
|
+
<span style="padding-right: 5px;"><a href="#M000120">stringify_keys!</a></span>
|
162
|
+
<span style="padding-right: 5px;"><a href="#M000115">swap!</a></span>
|
163
|
+
<span style="padding-right: 5px;"><a href="#M000117">symbolize_keys</a></span>
|
164
|
+
<span style="padding-right: 5px;"><a href="#M000118">symbolize_keys!</a></span>
|
156
165
|
<span style="padding-right: 5px;"><a href="#M000075">to_h</a></span>
|
157
|
-
<span style="padding-right: 5px;"><a href="#
|
158
|
-
<span style="padding-right: 5px;"><a href="#
|
159
|
-
<span style="padding-right: 5px;"><a href="#
|
160
|
-
<span style="padding-right: 5px;"><a href="#
|
161
|
-
<span style="padding-right: 5px;"><a href="#
|
162
|
-
<span style="padding-right: 5px;"><a href="#
|
163
|
-
<span style="padding-right: 5px;"><a href="#
|
164
|
-
<span style="padding-right: 5px;"><a href="#
|
165
|
-
<span style="padding-right: 5px;"><a href="#
|
166
|
-
<span style="padding-right: 5px;"><a href="#
|
167
|
-
<span style="padding-right: 5px;"><a href="#
|
166
|
+
<span style="padding-right: 5px;"><a href="#M000102">to_proc</a></span>
|
167
|
+
<span style="padding-right: 5px;"><a href="#M000103">to_proc_with_reponse</a></span>
|
168
|
+
<span style="padding-right: 5px;"><a href="#M000116">to_struct</a></span>
|
169
|
+
<span style="padding-right: 5px;"><a href="#M000094">traverse</a></span>
|
170
|
+
<span style="padding-right: 5px;"><a href="#M000095">traverse!</a></span>
|
171
|
+
<span style="padding-right: 5px;"><a href="#M000128">update_each</a></span>
|
172
|
+
<span style="padding-right: 5px;"><a href="#M000129">update_keys</a></span>
|
173
|
+
<span style="padding-right: 5px;"><a href="#M000077">update_values</a></span>
|
174
|
+
<span style="padding-right: 5px;"><a href="#M000114">weave</a></span>
|
175
|
+
<span style="padding-right: 5px;"><a href="#M000076">zipnew</a></span>
|
176
|
+
<span style="padding-right: 5px;"><a href="#M000096">|</a></span>
|
168
177
|
|
169
178
|
|
170
179
|
|
@@ -174,34 +183,33 @@ Object
|
|
174
183
|
<div class="sectiontitle">Public Class methods</div>
|
175
184
|
<div class="method">
|
176
185
|
<div class="title">
|
177
|
-
<a name="
|
186
|
+
<a name="M000079"></a><b>autonew</b>(*args)
|
178
187
|
</div>
|
179
188
|
<div class="description">
|
180
|
-
<
|
181
|
-
|
182
|
-
</p>
|
183
|
-
<pre>
|
184
|
-
ah = Hash.autonew
|
185
|
-
ah['section one']['param one'] = 4
|
186
|
-
ah['section one']['param two'] = 5
|
187
|
-
ah['section one']['param three'] = 2
|
188
|
-
ah['section one']['param four'] = 3
|
189
|
+
<pre>
|
190
|
+
Hash which auto initializes it's children.
|
189
191
|
|
190
|
-
|
191
|
-
|
192
|
+
ah = Hash.autonew
|
193
|
+
ah['section one']['param one'] = 4
|
194
|
+
ah['section one']['param two'] = 5
|
195
|
+
ah['section one']['param three'] = 2
|
196
|
+
ah['section one']['param four'] = 3
|
192
197
|
|
193
|
-
|
194
|
-
|
198
|
+
p ah
|
199
|
+
# {"section one"=>{"param one"=>4, "param four"=>3, "param three"=>2, "param two"=>5}}
|
200
|
+
|
201
|
+
p ah['section one'].keys
|
202
|
+
# ["param one", "param four", "param three", "param two"]
|
195
203
|
</pre>
|
196
204
|
<p>
|
197
|
-
CREDIT: Trans
|
205
|
+
CREDIT: Trans, Jan Molic
|
198
206
|
</p>
|
199
207
|
</div>
|
200
208
|
<div class="sourcecode">
|
201
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
202
|
-
<div id="
|
209
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">+</a> ]</p>
|
210
|
+
<div id="M000079_source" class="dyn-source">
|
203
211
|
<pre>
|
204
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/autonew.rb, line
|
212
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/autonew.rb, line 19</span>
|
205
213
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">autonew</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
206
214
|
<span class="ruby-comment cmt">#new(*args){|a,k| a[k] = self.class::new(*args)}</span>
|
207
215
|
<span class="ruby-identifier">leet</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hsh</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hsh</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">new</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">leet</span> ) }
|
@@ -213,7 +221,7 @@ CREDIT: Trans CREDIT: Jan Molic
|
|
213
221
|
</div>
|
214
222
|
<div class="method">
|
215
223
|
<div class="title">
|
216
|
-
<a name="
|
224
|
+
<a name="M000076"></a><b>zipnew</b>(keys,values)
|
217
225
|
</div>
|
218
226
|
<div class="description">
|
219
227
|
<p>
|
@@ -222,16 +230,16 @@ Creates a new hash from two arrays —a keys array and a values array.
|
|
222
230
|
<pre>
|
223
231
|
Hash.zipnew(["a","b","c"], [1,2,3])
|
224
232
|
#=> { "a"=>1, "b"=>2, "c"=>3 }
|
225
|
-
|
226
|
-
CREDIT: Trans
|
227
|
-
CREDIT: Ara T. Howard
|
228
233
|
</pre>
|
234
|
+
<p>
|
235
|
+
CREDIT: Trans, Ara T. Howard
|
236
|
+
</p>
|
229
237
|
</div>
|
230
238
|
<div class="sourcecode">
|
231
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
232
|
-
<div id="
|
239
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">+</a> ]</p>
|
240
|
+
<div id="M000076_source" class="dyn-source">
|
233
241
|
<pre>
|
234
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/
|
242
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/zipnew.rb, line 11</span>
|
235
243
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zipnew</span>(<span class="ruby-identifier">keys</span>,<span class="ruby-identifier">values</span>) <span class="ruby-comment cmt"># or some better name</span>
|
236
244
|
<span class="ruby-identifier">h</span> = {}
|
237
245
|
<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[ <span class="ruby-identifier">keys</span>[<span class="ruby-identifier">i</span>] ] = <span class="ruby-identifier">values</span>[<span class="ruby-identifier">i</span>] }
|
@@ -244,7 +252,7 @@ Creates a new hash from two arrays —a keys array and a values array.
|
|
244
252
|
<div class="sectiontitle">Public Instance methods</div>
|
245
253
|
<div class="method">
|
246
254
|
<div class="title">
|
247
|
-
<a name="
|
255
|
+
<a name="M000082"></a><b>&</b>(other)
|
248
256
|
</div>
|
249
257
|
<div class="description">
|
250
258
|
<p>
|
@@ -264,13 +272,13 @@ A hash can also be intersected with an array to intersect keys only.
|
|
264
272
|
The later form is similar to pairs_at. The differ only in that pairs_at
|
265
273
|
will return a nil value for a key not in the hash, but #& will not.
|
266
274
|
</p>
|
267
|
-
<
|
268
|
-
|
269
|
-
</
|
275
|
+
<p>
|
276
|
+
CREDIT: Trans
|
277
|
+
</p>
|
270
278
|
</div>
|
271
279
|
<div class="sourcecode">
|
272
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
273
|
-
<div id="
|
280
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000082_source')" id="l_M000082_source">+</a> ]</p>
|
281
|
+
<div id="M000082_source" class="dyn-source">
|
274
282
|
<pre>
|
275
283
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_and.rb, line 19</span>
|
276
284
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">&</span>(<span class="ruby-identifier">other</span>)
|
@@ -291,7 +299,7 @@ will return a nil value for a key not in the hash, but #& will not.
|
|
291
299
|
</div>
|
292
300
|
<div class="method">
|
293
301
|
<div class="title">
|
294
|
-
<a name="
|
302
|
+
<a name="M000097"></a><b>*</b>(other)
|
295
303
|
</div>
|
296
304
|
<div class="description">
|
297
305
|
<p>
|
@@ -303,13 +311,14 @@ Like merge operator ’+’ but merges in reverse order.
|
|
303
311
|
|
304
312
|
h1 + h2 #=> { :a=>2, :b=>3 }
|
305
313
|
h1 * h2 #=> { :a=>1, :b=>3 }
|
306
|
-
|
307
|
-
CREDIT: Trans
|
308
314
|
</pre>
|
315
|
+
<p>
|
316
|
+
CREDIT: Trans
|
317
|
+
</p>
|
309
318
|
</div>
|
310
319
|
<div class="sourcecode">
|
311
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
312
|
-
<div id="
|
320
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">+</a> ]</p>
|
321
|
+
<div id="M000097_source" class="dyn-source">
|
313
322
|
<pre>
|
314
323
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_mul.rb, line 13</span>
|
315
324
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">*</span>(<span class="ruby-identifier">other</span>)
|
@@ -321,19 +330,19 @@ Like merge operator ’+’ but merges in reverse order.
|
|
321
330
|
</div>
|
322
331
|
<div class="method">
|
323
332
|
<div class="title">
|
324
|
-
<a name="
|
333
|
+
<a name="M000125"></a><b>+</b>(other)
|
325
334
|
</div>
|
326
335
|
<div class="description">
|
327
336
|
<p>
|
328
337
|
Operator for merge.
|
329
338
|
</p>
|
330
|
-
<
|
331
|
-
|
332
|
-
</
|
339
|
+
<p>
|
340
|
+
CREDIT: Trans
|
341
|
+
</p>
|
333
342
|
</div>
|
334
343
|
<div class="sourcecode">
|
335
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
336
|
-
<div id="
|
344
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000125_source')" id="l_M000125_source">+</a> ]</p>
|
345
|
+
<div id="M000125_source" class="dyn-source">
|
337
346
|
<pre>
|
338
347
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_add.rb, line 7</span>
|
339
348
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">other</span>)
|
@@ -345,7 +354,7 @@ Operator for merge.
|
|
345
354
|
</div>
|
346
355
|
<div class="method">
|
347
356
|
<div class="title">
|
348
|
-
<a name="
|
357
|
+
<a name="M000083"></a><b>-</b>(other)
|
349
358
|
</div>
|
350
359
|
<div class="description">
|
351
360
|
<p>
|
@@ -353,13 +362,13 @@ Operator for remove hash paris. If another hash is given the pairs are only
|
|
353
362
|
removed if both key and value are equal. If an array is given then matching
|
354
363
|
keys are removed.
|
355
364
|
</p>
|
356
|
-
<
|
357
|
-
|
358
|
-
</
|
365
|
+
<p>
|
366
|
+
CREDIT: Trans
|
367
|
+
</p>
|
359
368
|
</div>
|
360
369
|
<div class="sourcecode">
|
361
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
362
|
-
<div id="
|
370
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">+</a> ]</p>
|
371
|
+
<div id="M000083_source" class="dyn-source">
|
363
372
|
<pre>
|
364
373
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_sub.rb, line 9</span>
|
365
374
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">other</span>)
|
@@ -383,19 +392,19 @@ keys are removed.
|
|
383
392
|
</div>
|
384
393
|
<div class="method">
|
385
394
|
<div class="title">
|
386
|
-
<a name="
|
395
|
+
<a name="M000098"></a><b><<</b>(other)
|
387
396
|
</div>
|
388
397
|
<div class="description">
|
389
398
|
<p>
|
390
399
|
Can be used like update, or passed as two-element [key,value] array.
|
391
400
|
</p>
|
392
|
-
<
|
393
|
-
|
394
|
-
</
|
401
|
+
<p>
|
402
|
+
CREDIT: Trans
|
403
|
+
</p>
|
395
404
|
</div>
|
396
405
|
<div class="sourcecode">
|
397
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
398
|
-
<div id="
|
406
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">+</a> ]</p>
|
407
|
+
<div id="M000098_source" class="dyn-source">
|
399
408
|
<pre>
|
400
409
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_push.rb, line 8</span>
|
401
410
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><<</span>(<span class="ruby-identifier">other</span>)
|
@@ -412,7 +421,7 @@ Can be used like update, or passed as two-element [key,value] array.
|
|
412
421
|
</div>
|
413
422
|
<div class="method">
|
414
423
|
<div class="title">
|
415
|
-
<a name="
|
424
|
+
<a name="M000078"></a><b>alias!</b>(newkey, oldkey)
|
416
425
|
</div>
|
417
426
|
<div class="description">
|
418
427
|
<p>
|
@@ -439,16 +448,16 @@ Returns a reference to the <a href="Hash.html">Hash</a>.
|
|
439
448
|
Note that if the <em>oldkey</em> is reassigned, the reference will no
|
440
449
|
longer exist, and the <em>newkey</em> will remain as it was.
|
441
450
|
</p>
|
442
|
-
<
|
443
|
-
|
444
|
-
</
|
451
|
+
<p>
|
452
|
+
CREDIT: Gavin Sinclair
|
453
|
+
</p>
|
445
454
|
<p>
|
446
455
|
TODO: Rename to aliaskey or something else.
|
447
456
|
</p>
|
448
457
|
</div>
|
449
458
|
<div class="sourcecode">
|
450
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
451
|
-
<div id="
|
459
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">+</a> ]</p>
|
460
|
+
<div id="M000078_source" class="dyn-source">
|
452
461
|
<pre>
|
453
462
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/alias.rb, line 25</span>
|
454
463
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alias!</span>(<span class="ruby-identifier">newkey</span>, <span class="ruby-identifier">oldkey</span>)
|
@@ -461,7 +470,7 @@ TODO: Rename to aliaskey or something else.
|
|
461
470
|
</div>
|
462
471
|
<div class="method">
|
463
472
|
<div class="title">
|
464
|
-
<a name="
|
473
|
+
<a name="M000130"></a><b>argumentize</b>(args_field=nil)
|
465
474
|
</div>
|
466
475
|
<div class="description">
|
467
476
|
<p>
|
@@ -475,8 +484,8 @@ Turn a hash into arguments.
|
|
475
484
|
</pre>
|
476
485
|
</div>
|
477
486
|
<div class="sourcecode">
|
478
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
479
|
-
<div id="
|
487
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000130_source')" id="l_M000130_source">+</a> ]</p>
|
488
|
+
<div id="M000130_source" class="dyn-source">
|
480
489
|
<pre>
|
481
490
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/argumentize.rb, line 10</span>
|
482
491
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">argumentize</span>(<span class="ruby-identifier">args_field</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -495,7 +504,7 @@ Turn a hash into arguments.
|
|
495
504
|
</div>
|
496
505
|
<div class="method">
|
497
506
|
<div class="title">
|
498
|
-
<a name="
|
507
|
+
<a name="M000109"></a><b>collate</b>(other_hash)
|
499
508
|
</div>
|
500
509
|
<div class="description">
|
501
510
|
<p>
|
@@ -505,13 +514,14 @@ to be arrays representing the values from both hashes.
|
|
505
514
|
<pre>
|
506
515
|
{ :a=>1, :b=>2 }.collate :a=>3, :b=>4, :c=>5
|
507
516
|
#=> { :a=>[1,3], :b=>[2,4], :c=>[5] }
|
508
|
-
|
509
|
-
CREDIT: Gavin Kistner (Phrogz)
|
510
517
|
</pre>
|
518
|
+
<p>
|
519
|
+
CREDIT: Gavin Kistner (Phrogz)
|
520
|
+
</p>
|
511
521
|
</div>
|
512
522
|
<div class="sourcecode">
|
513
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
514
|
-
<div id="
|
523
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">+</a> ]</p>
|
524
|
+
<div id="M000109_source" class="dyn-source">
|
515
525
|
<pre>
|
516
526
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/collate.rb, line 11</span>
|
517
527
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate</span>(<span class="ruby-identifier">other_hash</span>)
|
@@ -523,17 +533,17 @@ to be arrays representing the values from both hashes.
|
|
523
533
|
</div>
|
524
534
|
<div class="method">
|
525
535
|
<div class="title">
|
526
|
-
<a name="
|
536
|
+
<a name="M000110"></a><b>collate!</b>(other_hash)
|
527
537
|
</div>
|
528
538
|
<div class="description">
|
529
539
|
<p>
|
530
|
-
The same as <a href="Hash.html#
|
540
|
+
The same as <a href="Hash.html#M000109">collate</a>, but modifies the
|
531
541
|
receiver in place.
|
532
542
|
</p>
|
533
543
|
</div>
|
534
544
|
<div class="sourcecode">
|
535
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
536
|
-
<div id="
|
545
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">+</a> ]</p>
|
546
|
+
<div id="M000110_source" class="dyn-source">
|
537
547
|
<pre>
|
538
548
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/collate.rb, line 17</span>
|
539
549
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate!</span>(<span class="ruby-identifier">other_hash</span>)
|
@@ -568,19 +578,19 @@ receiver in place.
|
|
568
578
|
</div>
|
569
579
|
<div class="method">
|
570
580
|
<div class="title">
|
571
|
-
<a name="
|
581
|
+
<a name="M000111"></a><b>delete_unless</b>( {|| ...}
|
572
582
|
</div>
|
573
583
|
<div class="description">
|
574
584
|
<p>
|
575
585
|
Inverse of delete_if.
|
576
586
|
</p>
|
577
|
-
<
|
578
|
-
|
579
|
-
</
|
587
|
+
<p>
|
588
|
+
CREDIT: Daniel Schierbeck
|
589
|
+
</p>
|
580
590
|
</div>
|
581
591
|
<div class="sourcecode">
|
582
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
583
|
-
<div id="
|
592
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">+</a> ]</p>
|
593
|
+
<div id="M000111_source" class="dyn-source">
|
584
594
|
<pre>
|
585
595
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 11</span>
|
586
596
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_unless</span> <span class="ruby-comment cmt">#:yield:</span>
|
@@ -592,7 +602,7 @@ Inverse of delete_if.
|
|
592
602
|
</div>
|
593
603
|
<div class="method">
|
594
604
|
<div class="title">
|
595
|
-
<a name="
|
605
|
+
<a name="M000112"></a><b>delete_values</b>(*values)
|
596
606
|
</div>
|
597
607
|
<div class="description">
|
598
608
|
<p>
|
@@ -603,13 +613,14 @@ multiple keys.
|
|
603
613
|
hsh = { :a => 1, :b => 2 }
|
604
614
|
hsh.delete_values(1)
|
605
615
|
hsh #=> { :b => 2 }
|
606
|
-
|
607
|
-
CREDIT: Daniel Schierbeck
|
608
616
|
</pre>
|
617
|
+
<p>
|
618
|
+
CREDIT: Daniel Schierbeck
|
619
|
+
</p>
|
609
620
|
</div>
|
610
621
|
<div class="sourcecode">
|
611
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
612
|
-
<div id="
|
622
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000112_source')" id="l_M000112_source">+</a> ]</p>
|
623
|
+
<div id="M000112_source" class="dyn-source">
|
613
624
|
<pre>
|
614
625
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 24</span>
|
615
626
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_values</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">values</span>)
|
@@ -621,7 +632,7 @@ multiple keys.
|
|
621
632
|
</div>
|
622
633
|
<div class="method">
|
623
634
|
<div class="title">
|
624
|
-
<a name="
|
635
|
+
<a name="M000113"></a><b>delete_values_at</b>(*keys, &yld)
|
625
636
|
</div>
|
626
637
|
<div class="description">
|
627
638
|
<p>
|
@@ -638,13 +649,14 @@ This works niely with hash#[] and <a href="Hash.html">Hash</a>#[]= facets.
|
|
638
649
|
|
639
650
|
[a, b, c] #=> [1, 2, 3]
|
640
651
|
hsh #=> {}
|
641
|
-
|
642
|
-
CREDIT: Daniel Schierbeck
|
643
652
|
</pre>
|
653
|
+
<p>
|
654
|
+
CREDIT: Daniel Schierbeck
|
655
|
+
</p>
|
644
656
|
</div>
|
645
657
|
<div class="sourcecode">
|
646
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
647
|
-
<div id="
|
658
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000113_source')" id="l_M000113_source">+</a> ]</p>
|
659
|
+
<div id="M000113_source" class="dyn-source">
|
648
660
|
<pre>
|
649
661
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/delete.rb, line 42</span>
|
650
662
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_values_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keys</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
@@ -656,7 +668,7 @@ This works niely with hash#[] and <a href="Hash.html">Hash</a>#[]= facets.
|
|
656
668
|
</div>
|
657
669
|
<div class="method">
|
658
670
|
<div class="title">
|
659
|
-
<a name="
|
671
|
+
<a name="M000106"></a><b>diff</b>(hash)
|
660
672
|
</div>
|
661
673
|
<div class="description">
|
662
674
|
<p>
|
@@ -664,8 +676,8 @@ Difference comparison of two hashes.
|
|
664
676
|
</p>
|
665
677
|
</div>
|
666
678
|
<div class="sourcecode">
|
667
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
668
|
-
<div id="
|
679
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">+</a> ]</p>
|
680
|
+
<div id="M000106_source" class="dyn-source">
|
669
681
|
<pre>
|
670
682
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/diff.rb, line 5</span>
|
671
683
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">diff</span>(<span class="ruby-identifier">hash</span>)
|
@@ -679,20 +691,20 @@ Difference comparison of two hashes.
|
|
679
691
|
</div>
|
680
692
|
<div class="method">
|
681
693
|
<div class="title">
|
682
|
-
<a name="
|
694
|
+
<a name="M000090"></a><b>each_with_key</b>( &yld )
|
683
695
|
</div>
|
684
696
|
<div class="description">
|
685
697
|
<p>
|
686
698
|
Each with key is like each_pair but reverses the order the parameters to
|
687
699
|
[value,key] instead of [key,value].
|
688
700
|
</p>
|
689
|
-
<
|
690
|
-
|
691
|
-
</
|
701
|
+
<p>
|
702
|
+
CREDIT: Trans
|
703
|
+
</p>
|
692
704
|
</div>
|
693
705
|
<div class="sourcecode">
|
694
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
695
|
-
<div id="
|
706
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">+</a> ]</p>
|
707
|
+
<div id="M000090_source" class="dyn-source">
|
696
708
|
<pre>
|
697
709
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 40</span>
|
698
710
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_with_key</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span> )
|
@@ -704,7 +716,7 @@ Each with key is like each_pair but reverses the order the parameters to
|
|
704
716
|
</div>
|
705
717
|
<div class="method">
|
706
718
|
<div class="title">
|
707
|
-
<a name="
|
719
|
+
<a name="M000084"></a><b>except</b>(*less_keys)
|
708
720
|
</div>
|
709
721
|
<div class="description">
|
710
722
|
<p>
|
@@ -712,8 +724,8 @@ Returns a new hash less the given keys.
|
|
712
724
|
</p>
|
713
725
|
</div>
|
714
726
|
<div class="sourcecode">
|
715
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
716
|
-
<div id="
|
727
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">+</a> ]</p>
|
728
|
+
<div id="M000084_source" class="dyn-source">
|
717
729
|
<pre>
|
718
730
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/except.rb, line 5</span>
|
719
731
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">except</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">less_keys</span>)
|
@@ -725,7 +737,7 @@ Returns a new hash less the given keys.
|
|
725
737
|
</div>
|
726
738
|
<div class="method">
|
727
739
|
<div class="title">
|
728
|
-
<a name="
|
740
|
+
<a name="M000085"></a><b>except!</b>(*less_keys)
|
729
741
|
</div>
|
730
742
|
<div class="description">
|
731
743
|
<p>
|
@@ -739,8 +751,8 @@ keys removed.
|
|
739
751
|
</pre>
|
740
752
|
</div>
|
741
753
|
<div class="sourcecode">
|
742
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
743
|
-
<div id="
|
754
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">+</a> ]</p>
|
755
|
+
<div id="M000085_source" class="dyn-source">
|
744
756
|
<pre>
|
745
757
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/except.rb, line 18</span>
|
746
758
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">except!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">less_keys</span>)
|
@@ -754,7 +766,7 @@ keys removed.
|
|
754
766
|
</div>
|
755
767
|
<div class="method">
|
756
768
|
<div class="title">
|
757
|
-
<a name="
|
769
|
+
<a name="M000108"></a><b>graph!</b>(&yld)
|
758
770
|
</div>
|
759
771
|
<div class="description">
|
760
772
|
<p>
|
@@ -764,7 +776,7 @@ Alias for mash!
|
|
764
776
|
</div>
|
765
777
|
<div class="method">
|
766
778
|
<div class="title">
|
767
|
-
<a name="
|
779
|
+
<a name="M000086"></a><b>has_keys?</b>(*check_keys)
|
768
780
|
</div>
|
769
781
|
<div class="description">
|
770
782
|
<p>
|
@@ -774,17 +786,18 @@ Returns true or false whether the hash contains the given keys.
|
|
774
786
|
h = { :a => 1, :b => 2 }
|
775
787
|
h.has_keys?( :a ) #=> true
|
776
788
|
h.has_keys?( :c ) #=> false
|
777
|
-
|
778
|
-
CREDIT: Trans
|
779
789
|
</pre>
|
790
|
+
<p>
|
791
|
+
CREDIT: Trans
|
792
|
+
</p>
|
780
793
|
</div>
|
781
794
|
<div class="aka">
|
782
795
|
This method is also aliased as
|
783
|
-
<a href="Hash.html#
|
796
|
+
<a href="Hash.html#M000087">keys?</a>
|
784
797
|
</div>
|
785
798
|
<div class="sourcecode">
|
786
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
787
|
-
<div id="
|
799
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">+</a> ]</p>
|
800
|
+
<div id="M000086_source" class="dyn-source">
|
788
801
|
<pre>
|
789
802
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 12</span>
|
790
803
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
@@ -797,7 +810,7 @@ Returns true or false whether the hash contains the given keys.
|
|
797
810
|
</div>
|
798
811
|
<div class="method">
|
799
812
|
<div class="title">
|
800
|
-
<a name="
|
813
|
+
<a name="M000088"></a><b>has_only_keys?</b>(*check_keys)
|
801
814
|
</div>
|
802
815
|
<div class="description">
|
803
816
|
<p>
|
@@ -808,17 +821,18 @@ false.
|
|
808
821
|
h = { :a => 1, :b => 2 }
|
809
822
|
h.has_only_keys?( :a, :b ) #=> true
|
810
823
|
h.has_only_keys?( :a ) #=> false
|
811
|
-
|
812
|
-
CREDIT: Trans
|
813
824
|
</pre>
|
825
|
+
<p>
|
826
|
+
CREDIT: Trans
|
827
|
+
</p>
|
814
828
|
</div>
|
815
829
|
<div class="aka">
|
816
830
|
This method is also aliased as
|
817
|
-
<a href="Hash.html#
|
831
|
+
<a href="Hash.html#M000089">only_keys?</a>
|
818
832
|
</div>
|
819
833
|
<div class="sourcecode">
|
820
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
821
|
-
<div id="
|
834
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">+</a> ]</p>
|
835
|
+
<div id="M000088_source" class="dyn-source">
|
822
836
|
<pre>
|
823
837
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/keys.rb, line 28</span>
|
824
838
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_only_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
@@ -831,7 +845,7 @@ false.
|
|
831
845
|
</div>
|
832
846
|
<div class="method">
|
833
847
|
<div class="title">
|
834
|
-
<a name="
|
848
|
+
<a name="M000104"></a><b>insert</b>(name, value)
|
835
849
|
</div>
|
836
850
|
<div class="description">
|
837
851
|
<p>
|
@@ -840,13 +854,13 @@ As with store but only if the key isn‘t already in the hash.
|
|
840
854
|
<p>
|
841
855
|
TODO: Would store? be a better name?
|
842
856
|
</p>
|
843
|
-
<
|
844
|
-
|
845
|
-
</
|
857
|
+
<p>
|
858
|
+
CREDIT: Trans
|
859
|
+
</p>
|
846
860
|
</div>
|
847
861
|
<div class="sourcecode">
|
848
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
849
|
-
<div id="
|
862
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">+</a> ]</p>
|
863
|
+
<div id="M000104_source" class="dyn-source">
|
850
864
|
<pre>
|
851
865
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/insert.rb, line 10</span>
|
852
866
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">insert</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span>)
|
@@ -863,11 +877,11 @@ TODO: Would store? be a better name?
|
|
863
877
|
</div>
|
864
878
|
<div class="method">
|
865
879
|
<div class="title">
|
866
|
-
<a name="
|
880
|
+
<a name="M000099"></a><b>inverse</b>()
|
867
881
|
</div>
|
868
882
|
<div class="description">
|
869
883
|
<p>
|
870
|
-
Create a "true" <a href="Hash.html#
|
884
|
+
Create a "true" <a href="Hash.html#M000099">inverse</a> hash by
|
871
885
|
storing mutliple values in Arrays.
|
872
886
|
</p>
|
873
887
|
<pre>
|
@@ -877,13 +891,14 @@ storing mutliple values in Arrays.
|
|
877
891
|
h.inverse #=> {2=>"d", 3=>["f", "c", "b", "a"], 9=>["g", "e"]}
|
878
892
|
h.inverse.inverse #=> {"a"=>3, "b"=>3, "c"=>3, "d"=>2, "e"=>9, "f"=>3, "g"=>9}
|
879
893
|
h.inverse.inverse == h #=> true
|
880
|
-
|
881
|
-
CREDIT: Tilo Sloboda
|
882
894
|
</pre>
|
895
|
+
<p>
|
896
|
+
CREDIT: Tilo Sloboda
|
897
|
+
</p>
|
883
898
|
</div>
|
884
899
|
<div class="sourcecode">
|
885
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
886
|
-
<div id="
|
900
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000099_source')" id="l_M000099_source">+</a> ]</p>
|
901
|
+
<div id="M000099_source" class="dyn-source">
|
887
902
|
<pre>
|
888
903
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/inverse.rb, line 14</span>
|
889
904
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse</span>
|
@@ -903,19 +918,19 @@ storing mutliple values in Arrays.
|
|
903
918
|
</div>
|
904
919
|
<div class="method">
|
905
920
|
<div class="title">
|
906
|
-
<a name="
|
921
|
+
<a name="M000121"></a><b>join</b>(pair_divider='', elem_divider='')
|
907
922
|
</div>
|
908
923
|
<div class="description">
|
909
924
|
<p>
|
910
925
|
Like Array#join but specialized to <a href="Hash.html">Hash</a>.
|
911
926
|
</p>
|
912
|
-
<
|
913
|
-
|
914
|
-
</
|
927
|
+
<p>
|
928
|
+
CREDIT: Mauricio Fernandez
|
929
|
+
</p>
|
915
930
|
</div>
|
916
931
|
<div class="sourcecode">
|
917
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
918
|
-
<div id="
|
932
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000121_source')" id="l_M000121_source">+</a> ]</p>
|
933
|
+
<div id="M000121_source" class="dyn-source">
|
919
934
|
<pre>
|
920
935
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/join.rb, line 7</span>
|
921
936
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>(<span class="ruby-identifier">pair_divider</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">elem_divider</span>=<span class="ruby-value str">''</span>)
|
@@ -929,7 +944,7 @@ Like Array#join but specialized to <a href="Hash.html">Hash</a>.
|
|
929
944
|
</div>
|
930
945
|
<div class="method">
|
931
946
|
<div class="title">
|
932
|
-
<a name="
|
947
|
+
<a name="M000087"></a><b>keys?</b>(*check_keys)
|
933
948
|
</div>
|
934
949
|
<div class="description">
|
935
950
|
<p>
|
@@ -939,7 +954,7 @@ Alias for has_keys?
|
|
939
954
|
</div>
|
940
955
|
<div class="method">
|
941
956
|
<div class="title">
|
942
|
-
<a name="
|
957
|
+
<a name="M000107"></a><b>mash!</b>(&yld)
|
943
958
|
</div>
|
944
959
|
<div class="description">
|
945
960
|
<p>
|
@@ -952,11 +967,11 @@ In place version of mash.
|
|
952
967
|
</div>
|
953
968
|
<div class="aka">
|
954
969
|
This method is also aliased as
|
955
|
-
<a href="Hash.html#
|
970
|
+
<a href="Hash.html#M000108">graph!</a>
|
956
971
|
</div>
|
957
972
|
<div class="sourcecode">
|
958
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
959
|
-
<div id="
|
973
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000107_source')" id="l_M000107_source">+</a> ]</p>
|
974
|
+
<div id="M000107_source" class="dyn-source">
|
960
975
|
<pre>
|
961
976
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/mash.rb, line 10</span>
|
962
977
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mash!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
@@ -968,7 +983,7 @@ In place version of mash.
|
|
968
983
|
</div>
|
969
984
|
<div class="method">
|
970
985
|
<div class="title">
|
971
|
-
<a name="
|
986
|
+
<a name="M000089"></a><b>only_keys?</b>(*check_keys)
|
972
987
|
</div>
|
973
988
|
<div class="description">
|
974
989
|
<p>
|
@@ -978,17 +993,17 @@ Alias for has_only_keys?
|
|
978
993
|
</div>
|
979
994
|
<div class="method">
|
980
995
|
<div class="title">
|
981
|
-
<a name="
|
996
|
+
<a name="M000100"></a><b>recursive_merge</b>(other)
|
982
997
|
</div>
|
983
998
|
<div class="description">
|
984
999
|
<p>
|
985
|
-
Same as Hash#merge but <a href="Hash.html#
|
1000
|
+
Same as Hash#merge but <a href="Hash.html#M000080">recursively</a> merges
|
986
1001
|
sub-hashes.
|
987
1002
|
</p>
|
988
1003
|
</div>
|
989
1004
|
<div class="sourcecode">
|
990
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
991
|
-
<div id="
|
1005
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">+</a> ]</p>
|
1006
|
+
<div id="M000100_source" class="dyn-source">
|
992
1007
|
<pre>
|
993
1008
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursive_merge.rb, line 5</span>
|
994
1009
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursive_merge</span>(<span class="ruby-identifier">other</span>)
|
@@ -1009,17 +1024,17 @@ sub-hashes.
|
|
1009
1024
|
</div>
|
1010
1025
|
<div class="method">
|
1011
1026
|
<div class="title">
|
1012
|
-
<a name="
|
1027
|
+
<a name="M000101"></a><b>recursive_merge!</b>(other)
|
1013
1028
|
</div>
|
1014
1029
|
<div class="description">
|
1015
1030
|
<p>
|
1016
|
-
Same as Hash#merge! but <a href="Hash.html#
|
1031
|
+
Same as Hash#merge! but <a href="Hash.html#M000080">recursively</a> merges
|
1017
1032
|
sub-hashes.
|
1018
1033
|
</p>
|
1019
1034
|
</div>
|
1020
1035
|
<div class="sourcecode">
|
1021
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1022
|
-
<div id="
|
1036
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">+</a> ]</p>
|
1037
|
+
<div id="M000101_source" class="dyn-source">
|
1023
1038
|
<pre>
|
1024
1039
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursive_merge.rb, line 20</span>
|
1025
1040
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursive_merge!</span>(<span class="ruby-identifier">other</span>)
|
@@ -1039,11 +1054,11 @@ sub-hashes.
|
|
1039
1054
|
</div>
|
1040
1055
|
<div class="method">
|
1041
1056
|
<div class="title">
|
1042
|
-
<a name="
|
1057
|
+
<a name="M000080"></a><b>recursively</b>() {|h| ...}
|
1043
1058
|
</div>
|
1044
1059
|
<div class="description">
|
1045
1060
|
<p>
|
1046
|
-
Apply a block to hash, and <a href="Hash.html#
|
1061
|
+
Apply a block to hash, and <a href="Hash.html#M000080">recursively</a>
|
1047
1062
|
apply that block to each subhash.
|
1048
1063
|
</p>
|
1049
1064
|
<pre>
|
@@ -1053,8 +1068,8 @@ apply that block to each subhash.
|
|
1053
1068
|
</pre>
|
1054
1069
|
</div>
|
1055
1070
|
<div class="sourcecode">
|
1056
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1057
|
-
<div id="
|
1071
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000080_source')" id="l_M000080_source">+</a> ]</p>
|
1072
|
+
<div id="M000080_source" class="dyn-source">
|
1058
1073
|
<pre>
|
1059
1074
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursively.rb, line 10</span>
|
1060
1075
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursively</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1074,11 +1089,11 @@ apply that block to each subhash.
|
|
1074
1089
|
</div>
|
1075
1090
|
<div class="method">
|
1076
1091
|
<div class="title">
|
1077
|
-
<a name="
|
1092
|
+
<a name="M000081"></a><b>recursively!</b>(&block)
|
1078
1093
|
</div>
|
1079
1094
|
<div class="sourcecode">
|
1080
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1081
|
-
<div id="
|
1095
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">+</a> ]</p>
|
1096
|
+
<div id="M000081_source" class="dyn-source">
|
1082
1097
|
<pre>
|
1083
1098
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/recursively.rb, line 24</span>
|
1084
1099
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">recursively!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1090,15 +1105,23 @@ apply that block to each subhash.
|
|
1090
1105
|
</div>
|
1091
1106
|
<div class="method">
|
1092
1107
|
<div class="title">
|
1093
|
-
<a name="
|
1108
|
+
<a name="M000126"></a><b>rekey</b>(*args, &block)
|
1094
1109
|
</div>
|
1095
1110
|
<div class="description">
|
1096
1111
|
<p>
|
1097
|
-
|
1098
|
-
|
1112
|
+
Rekey a hash.
|
1113
|
+
</p>
|
1114
|
+
<pre>
|
1115
|
+
rekey()
|
1116
|
+
rekey(to_key, from_key)
|
1117
|
+
rekey{ |key| ... }
|
1118
|
+
</pre>
|
1119
|
+
<p>
|
1120
|
+
If no arguments or block are given, then all keys are converted to Symbols.
|
1099
1121
|
</p>
|
1100
1122
|
<p>
|
1101
|
-
If two keys are given, then the second key is changed to the first.
|
1123
|
+
If two keys are given, then the second key is changed to the first. You can
|
1124
|
+
think of it as <tt>alias</tt> for hash keys.
|
1102
1125
|
</p>
|
1103
1126
|
<pre>
|
1104
1127
|
foo = { :a=>1, :b=>2 }
|
@@ -1115,16 +1138,16 @@ key, then that key will be left intact.
|
|
1115
1138
|
foo = { :name=>'Gavin', :wife=>:Lisa }
|
1116
1139
|
foo.rekey{ |k| k.to_s } #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1117
1140
|
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
1118
|
-
|
1119
|
-
CREDIT: Trans
|
1120
|
-
CREDIT: Gavin Kistner
|
1121
1141
|
</pre>
|
1142
|
+
<p>
|
1143
|
+
CREDIT: Trans, Gavin Kistner
|
1144
|
+
</p>
|
1122
1145
|
</div>
|
1123
1146
|
<div class="sourcecode">
|
1124
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1125
|
-
<div id="
|
1147
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000126_source')" id="l_M000126_source">+</a> ]</p>
|
1148
|
+
<div id="M000126_source" class="dyn-source">
|
1126
1149
|
<pre>
|
1127
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line
|
1150
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line 32</span>
|
1128
1151
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rekey</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1129
1152
|
<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">rekey!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1130
1153
|
<span class="ruby-keyword kw">end</span>
|
@@ -1134,27 +1157,27 @@ key, then that key will be left intact.
|
|
1134
1157
|
</div>
|
1135
1158
|
<div class="method">
|
1136
1159
|
<div class="title">
|
1137
|
-
<a name="
|
1160
|
+
<a name="M000127"></a><b>rekey!</b>(*args, &block)
|
1138
1161
|
</div>
|
1139
1162
|
<div class="description">
|
1140
1163
|
<p>
|
1141
|
-
Synonym for <a href="Hash.html#
|
1164
|
+
Synonym for <a href="Hash.html#M000126">Hash#rekey</a>, but modifies the
|
1142
1165
|
receiver in place (and returns it).
|
1143
1166
|
</p>
|
1144
1167
|
<pre>
|
1145
1168
|
foo = { :name=>'Gavin', :wife=>:Lisa }
|
1146
1169
|
foo.rekey!{ |k| k.to_s } #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1147
1170
|
foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1148
|
-
|
1149
|
-
CREDIT: Trans
|
1150
|
-
CREDIT: Gavin Kistner
|
1151
1171
|
</pre>
|
1172
|
+
<p>
|
1173
|
+
CREDIT: Trans, Gavin Kistner
|
1174
|
+
</p>
|
1152
1175
|
</div>
|
1153
1176
|
<div class="sourcecode">
|
1154
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1155
|
-
<div id="
|
1177
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000127_source')" id="l_M000127_source">+</a> ]</p>
|
1178
|
+
<div id="M000127_source" class="dyn-source">
|
1156
1179
|
<pre>
|
1157
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line
|
1180
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/rekey.rb, line 44</span>
|
1158
1181
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rekey!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1159
1182
|
<span class="ruby-comment cmt"># for backward comptability (TODO: DEPRECATE).</span>
|
1160
1183
|
<span class="ruby-identifier">block</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>.<span class="ruby-identifier">to_sym</span>.<span class="ruby-identifier">to_proc</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
@@ -1178,22 +1201,22 @@ receiver in place (and returns it).
|
|
1178
1201
|
</div>
|
1179
1202
|
<div class="method">
|
1180
1203
|
<div class="title">
|
1181
|
-
<a name="
|
1204
|
+
<a name="M000122"></a><b>replace_each</b>( {|| ...}
|
1182
1205
|
</div>
|
1183
1206
|
<div class="description">
|
1184
1207
|
<p>
|
1185
|
-
Same as <a href="Hash.html#
|
1208
|
+
Same as <a href="Hash.html#M000128">update_each</a>, but deletes the key
|
1186
1209
|
element first.
|
1187
1210
|
</p>
|
1188
|
-
<
|
1189
|
-
|
1190
|
-
</
|
1211
|
+
<p>
|
1212
|
+
CREDIT: Trans
|
1213
|
+
</p>
|
1191
1214
|
</div>
|
1192
1215
|
<div class="sourcecode">
|
1193
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1194
|
-
<div id="
|
1216
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000122_source')" id="l_M000122_source">+</a> ]</p>
|
1217
|
+
<div id="M000122_source" class="dyn-source">
|
1195
1218
|
<pre>
|
1196
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/
|
1219
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/replace_each.rb, line 7</span>
|
1197
1220
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
1198
1221
|
<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1199
1222
|
<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
@@ -1207,7 +1230,7 @@ element first.
|
|
1207
1230
|
</div>
|
1208
1231
|
<div class="method">
|
1209
1232
|
<div class="title">
|
1210
|
-
<a name="
|
1233
|
+
<a name="M000091"></a><b>reverse_merge</b>(other)
|
1211
1234
|
</div>
|
1212
1235
|
<div class="description">
|
1213
1236
|
<p>
|
@@ -1226,8 +1249,8 @@ in doesn‘t already have those keys set.
|
|
1226
1249
|
</p>
|
1227
1250
|
</div>
|
1228
1251
|
<div class="sourcecode">
|
1229
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1230
|
-
<div id="
|
1252
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000091_source')" id="l_M000091_source">+</a> ]</p>
|
1253
|
+
<div id="M000091_source" class="dyn-source">
|
1231
1254
|
<pre>
|
1232
1255
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/merge.rb, line 15</span>
|
1233
1256
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reverse_merge</span>(<span class="ruby-identifier">other</span>)
|
@@ -1239,20 +1262,20 @@ in doesn‘t already have those keys set.
|
|
1239
1262
|
</div>
|
1240
1263
|
<div class="method">
|
1241
1264
|
<div class="title">
|
1242
|
-
<a name="
|
1265
|
+
<a name="M000092"></a><b>reverse_merge!</b>(other)
|
1243
1266
|
</div>
|
1244
1267
|
<div class="description">
|
1245
1268
|
<p>
|
1246
|
-
Inplace form of <a href="Hash.html#
|
1269
|
+
Inplace form of <a href="Hash.html#M000091">reverse_merge</a>.
|
1247
1270
|
</p>
|
1248
1271
|
</div>
|
1249
1272
|
<div class="aka">
|
1250
1273
|
This method is also aliased as
|
1251
|
-
<a href="Hash.html#
|
1274
|
+
<a href="Hash.html#M000093">reverse_update</a>
|
1252
1275
|
</div>
|
1253
1276
|
<div class="sourcecode">
|
1254
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1255
|
-
<div id="
|
1277
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000092_source')" id="l_M000092_source">+</a> ]</p>
|
1278
|
+
<div id="M000092_source" class="dyn-source">
|
1256
1279
|
<pre>
|
1257
1280
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/merge.rb, line 21</span>
|
1258
1281
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-identifier">other</span>)
|
@@ -1264,32 +1287,31 @@ Inplace form of <a href="Hash.html#M000094">reverse_merge</a>.
|
|
1264
1287
|
</div>
|
1265
1288
|
<div class="method">
|
1266
1289
|
<div class="title">
|
1267
|
-
<a name="
|
1290
|
+
<a name="M000093"></a><b>reverse_update</b>(other)
|
1268
1291
|
</div>
|
1269
1292
|
<div class="description">
|
1270
1293
|
<p>
|
1271
|
-
Alias for <a href="Hash.html#
|
1294
|
+
Alias for <a href="Hash.html#M000091">reverse_merge</a>!
|
1272
1295
|
</p>
|
1273
1296
|
</div>
|
1274
1297
|
</div>
|
1275
1298
|
<div class="method">
|
1276
1299
|
<div class="title">
|
1277
|
-
<a name="
|
1300
|
+
<a name="M000105"></a><b>select!</b>() {|k,v| ...}
|
1278
1301
|
</div>
|
1279
1302
|
<div class="description">
|
1280
1303
|
<p>
|
1281
1304
|
In-place version of Hash#select. The opposite of the built-in Hash#reject!.
|
1282
1305
|
</p>
|
1283
|
-
<
|
1284
|
-
|
1285
|
-
|
1286
|
-
</pre>
|
1306
|
+
<p>
|
1307
|
+
CREDIT: Gavin Sinclair, Noah Gibbs
|
1308
|
+
</p>
|
1287
1309
|
</div>
|
1288
1310
|
<div class="sourcecode">
|
1289
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1290
|
-
<div id="
|
1311
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">+</a> ]</p>
|
1312
|
+
<div id="M000105_source" class="dyn-source">
|
1291
1313
|
<pre>
|
1292
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/select.rb, line
|
1314
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/select.rb, line 8</span>
|
1293
1315
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select!</span>
|
1294
1316
|
<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) }
|
1295
1317
|
<span class="ruby-keyword kw">end</span>
|
@@ -1299,7 +1321,7 @@ In-place version of Hash#select. The opposite of the built-in Hash#reject!.
|
|
1299
1321
|
</div>
|
1300
1322
|
<div class="method">
|
1301
1323
|
<div class="title">
|
1302
|
-
<a name="
|
1324
|
+
<a name="M000123"></a><b>slice</b>(*keep_keys)
|
1303
1325
|
</div>
|
1304
1326
|
<div class="description">
|
1305
1327
|
<p>
|
@@ -1307,8 +1329,8 @@ Returns a new hash with only the given keys.
|
|
1307
1329
|
</p>
|
1308
1330
|
</div>
|
1309
1331
|
<div class="sourcecode">
|
1310
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1311
|
-
<div id="
|
1332
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000123_source')" id="l_M000123_source">+</a> ]</p>
|
1333
|
+
<div id="M000123_source" class="dyn-source">
|
1312
1334
|
<pre>
|
1313
1335
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/slice.rb, line 9</span>
|
1314
1336
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slice</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keep_keys</span>)
|
@@ -1324,7 +1346,7 @@ Returns a new hash with only the given keys.
|
|
1324
1346
|
</div>
|
1325
1347
|
<div class="method">
|
1326
1348
|
<div class="title">
|
1327
|
-
<a name="
|
1349
|
+
<a name="M000124"></a><b>slice!</b>(*keep_keys)
|
1328
1350
|
</div>
|
1329
1351
|
<div class="description">
|
1330
1352
|
<p>
|
@@ -1338,8 +1360,8 @@ hash of keys removed.
|
|
1338
1360
|
</pre>
|
1339
1361
|
</div>
|
1340
1362
|
<div class="sourcecode">
|
1341
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1342
|
-
<div id="
|
1363
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000124_source')" id="l_M000124_source">+</a> ]</p>
|
1364
|
+
<div id="M000124_source" class="dyn-source">
|
1343
1365
|
<pre>
|
1344
1366
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/slice.rb, line 24</span>
|
1345
1367
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slice!</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">keep_keys</span>)
|
@@ -1353,7 +1375,79 @@ hash of keys removed.
|
|
1353
1375
|
</div>
|
1354
1376
|
<div class="method">
|
1355
1377
|
<div class="title">
|
1356
|
-
<a name="
|
1378
|
+
<a name="M000119"></a><b>stringify_keys</b>(&filter)
|
1379
|
+
</div>
|
1380
|
+
<div class="description">
|
1381
|
+
<p>
|
1382
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Strings, returning
|
1383
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt> parameter,
|
1384
|
+
limits conversion to only a certain selection of keys.
|
1385
|
+
</p>
|
1386
|
+
<pre>
|
1387
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
1388
|
+
foo.stringify_keys #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1389
|
+
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
1390
|
+
</pre>
|
1391
|
+
<p>
|
1392
|
+
This method is considered archaic. Use <a
|
1393
|
+
href="Hash.html#M000126">rekey</a> instead.
|
1394
|
+
</p>
|
1395
|
+
</div>
|
1396
|
+
<div class="sourcecode">
|
1397
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000119_source')" id="l_M000119_source">+</a> ]</p>
|
1398
|
+
<div id="M000119_source" class="dyn-source">
|
1399
|
+
<pre>
|
1400
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 54</span>
|
1401
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
1402
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
1403
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
1404
|
+
<span class="ruby-keyword kw">else</span>
|
1405
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
1406
|
+
<span class="ruby-keyword kw">end</span>
|
1407
|
+
<span class="ruby-keyword kw">end</span>
|
1408
|
+
</pre>
|
1409
|
+
</div>
|
1410
|
+
</div>
|
1411
|
+
</div>
|
1412
|
+
<div class="method">
|
1413
|
+
<div class="title">
|
1414
|
+
<a name="M000120"></a><b>stringify_keys!</b>(&filter)
|
1415
|
+
</div>
|
1416
|
+
<div class="description">
|
1417
|
+
<p>
|
1418
|
+
Synonym for <a href="Hash.html#M000119">Hash#stringify_keys</a>, but
|
1419
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
1420
|
+
parameter, limits conversion to only a certain selection of keys.
|
1421
|
+
</p>
|
1422
|
+
<pre>
|
1423
|
+
foo = { :name=>'Gavin', :wife=>:Lisa }
|
1424
|
+
foo.stringify_keys! #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1425
|
+
foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
1426
|
+
</pre>
|
1427
|
+
<p>
|
1428
|
+
This method is considered archaic. Use <a
|
1429
|
+
href="Hash.html#M000126">rekey</a> instead.
|
1430
|
+
</p>
|
1431
|
+
</div>
|
1432
|
+
<div class="sourcecode">
|
1433
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000120_source')" id="l_M000120_source">+</a> ]</p>
|
1434
|
+
<div id="M000120_source" class="dyn-source">
|
1435
|
+
<pre>
|
1436
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 73</span>
|
1437
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stringify_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
1438
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
1439
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
1440
|
+
<span class="ruby-keyword kw">else</span>
|
1441
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> }
|
1442
|
+
<span class="ruby-keyword kw">end</span>
|
1443
|
+
<span class="ruby-keyword kw">end</span>
|
1444
|
+
</pre>
|
1445
|
+
</div>
|
1446
|
+
</div>
|
1447
|
+
</div>
|
1448
|
+
<div class="method">
|
1449
|
+
<div class="title">
|
1450
|
+
<a name="M000115"></a><b>swap!</b>(key1, key2)
|
1357
1451
|
</div>
|
1358
1452
|
<div class="description">
|
1359
1453
|
<p>
|
@@ -1367,8 +1461,8 @@ CREDIT: Gavin Sinclair
|
|
1367
1461
|
</p>
|
1368
1462
|
</div>
|
1369
1463
|
<div class="sourcecode">
|
1370
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1371
|
-
<div id="
|
1464
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000115_source')" id="l_M000115_source">+</a> ]</p>
|
1465
|
+
<div id="M000115_source" class="dyn-source">
|
1372
1466
|
<pre>
|
1373
1467
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/swap.rb, line 9</span>
|
1374
1468
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">swap!</span>(<span class="ruby-identifier">key1</span>, <span class="ruby-identifier">key2</span>)
|
@@ -1381,6 +1475,78 @@ CREDIT: Gavin Sinclair
|
|
1381
1475
|
</div>
|
1382
1476
|
</div>
|
1383
1477
|
</div>
|
1478
|
+
<div class="method">
|
1479
|
+
<div class="title">
|
1480
|
+
<a name="M000117"></a><b>symbolize_keys</b>(&filter)
|
1481
|
+
</div>
|
1482
|
+
<div class="description">
|
1483
|
+
<p>
|
1484
|
+
Converts all keys in the <a href="Hash.html">Hash</a> to Symbols, returning
|
1485
|
+
a new <a href="Hash.html">Hash</a>. With a <tt>filter</tt>, limits
|
1486
|
+
conversion to only a certain selection of keys.
|
1487
|
+
</p>
|
1488
|
+
<pre>
|
1489
|
+
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
1490
|
+
foo.symbolize_keys #=> { :name=>"Gavin", :wife=>:Lisa }
|
1491
|
+
foo.inspect #=> { "name" =>"Gavin", "wife"=>:Lisa }
|
1492
|
+
</pre>
|
1493
|
+
<p>
|
1494
|
+
This method is considered archaic. Use <a
|
1495
|
+
href="Hash.html#M000126">rekey</a> instead.
|
1496
|
+
</p>
|
1497
|
+
</div>
|
1498
|
+
<div class="sourcecode">
|
1499
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000117_source')" id="l_M000117_source">+</a> ]</p>
|
1500
|
+
<div id="M000117_source" class="dyn-source">
|
1501
|
+
<pre>
|
1502
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 20</span>
|
1503
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
1504
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
1505
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
1506
|
+
<span class="ruby-keyword kw">else</span>
|
1507
|
+
<span class="ruby-identifier">rekey</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
1508
|
+
<span class="ruby-keyword kw">end</span>
|
1509
|
+
<span class="ruby-keyword kw">end</span>
|
1510
|
+
</pre>
|
1511
|
+
</div>
|
1512
|
+
</div>
|
1513
|
+
</div>
|
1514
|
+
<div class="method">
|
1515
|
+
<div class="title">
|
1516
|
+
<a name="M000118"></a><b>symbolize_keys!</b>(&filter)
|
1517
|
+
</div>
|
1518
|
+
<div class="description">
|
1519
|
+
<p>
|
1520
|
+
Synonym for <a href="Hash.html#M000117">Hash#symbolize_keys</a>, but
|
1521
|
+
modifies the receiver in place and returns it. With a <tt>filter</tt>
|
1522
|
+
parameter, limits conversion to only a certain selection of keys.
|
1523
|
+
</p>
|
1524
|
+
<pre>
|
1525
|
+
foo = { 'name'=>'Gavin', 'wife'=>:Lisa }
|
1526
|
+
foo.symbolize_keys! #=> { :name=>"Gavin", :wife=>:Lisa }
|
1527
|
+
foo.inspect #=> { :name=>"Gavin", :wife=>:Lisa }
|
1528
|
+
</pre>
|
1529
|
+
<p>
|
1530
|
+
This method is considered archaic. Use <a
|
1531
|
+
href="Hash.html#M000126">rekey</a> instead.
|
1532
|
+
</p>
|
1533
|
+
</div>
|
1534
|
+
<div class="sourcecode">
|
1535
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000118_source')" id="l_M000118_source">+</a> ]</p>
|
1536
|
+
<div id="M000118_source" class="dyn-source">
|
1537
|
+
<pre>
|
1538
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/symbolize_keys.rb, line 37</span>
|
1539
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolize_keys!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">filter</span>)
|
1540
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filter</span>
|
1541
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">filter</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> }
|
1542
|
+
<span class="ruby-keyword kw">else</span>
|
1543
|
+
<span class="ruby-identifier">rekey!</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span> }
|
1544
|
+
<span class="ruby-keyword kw">end</span>
|
1545
|
+
<span class="ruby-keyword kw">end</span>
|
1546
|
+
</pre>
|
1547
|
+
</div>
|
1548
|
+
</div>
|
1549
|
+
</div>
|
1384
1550
|
<div class="method">
|
1385
1551
|
<div class="title">
|
1386
1552
|
<a name="M000075"></a><b>to_h</b>()
|
@@ -1408,7 +1574,7 @@ CREDIT: Forian Gross
|
|
1408
1574
|
</div>
|
1409
1575
|
<div class="method">
|
1410
1576
|
<div class="title">
|
1411
|
-
<a name="
|
1577
|
+
<a name="M000102"></a><b>to_proc</b>()
|
1412
1578
|
</div>
|
1413
1579
|
<div class="description">
|
1414
1580
|
<p>
|
@@ -1428,8 +1594,8 @@ CREDIT: Trans
|
|
1428
1594
|
</p>
|
1429
1595
|
</div>
|
1430
1596
|
<div class="sourcecode">
|
1431
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1432
|
-
<div id="
|
1597
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">+</a> ]</p>
|
1598
|
+
<div id="M000102_source" class="dyn-source">
|
1433
1599
|
<pre>
|
1434
1600
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_proc.rb, line 15</span>
|
1435
1601
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
|
@@ -1446,14 +1612,14 @@ CREDIT: Trans
|
|
1446
1612
|
</div>
|
1447
1613
|
<div class="method">
|
1448
1614
|
<div class="title">
|
1449
|
-
<a name="
|
1615
|
+
<a name="M000103"></a><b>to_proc_with_reponse</b>()
|
1450
1616
|
</div>
|
1451
1617
|
<div class="description">
|
1452
1618
|
<p>
|
1453
|
-
A fault-tolerent version of <a href="Hash.html#
|
1619
|
+
A fault-tolerent version of <a href="Hash.html#M000102">to_proc</a>.
|
1454
1620
|
</p>
|
1455
1621
|
<p>
|
1456
|
-
It works just like <a href="Hash.html#
|
1622
|
+
It works just like <a href="Hash.html#M000102">to_proc</a>, but the block
|
1457
1623
|
will make sure# the object responds to the assignment.
|
1458
1624
|
</p>
|
1459
1625
|
<p>
|
@@ -1461,8 +1627,8 @@ CREDIT: Trans
|
|
1461
1627
|
</p>
|
1462
1628
|
</div>
|
1463
1629
|
<div class="sourcecode">
|
1464
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1465
|
-
<div id="
|
1630
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">+</a> ]</p>
|
1631
|
+
<div id="M000103_source" class="dyn-source">
|
1466
1632
|
<pre>
|
1467
1633
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_proc.rb, line 31</span>
|
1468
1634
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc_with_reponse</span>
|
@@ -1479,11 +1645,12 @@ CREDIT: Trans
|
|
1479
1645
|
</div>
|
1480
1646
|
<div class="method">
|
1481
1647
|
<div class="title">
|
1482
|
-
<a name="
|
1648
|
+
<a name="M000116"></a><b>to_struct</b>(struct_name)
|
1483
1649
|
</div>
|
1484
1650
|
<div class="description">
|
1485
1651
|
<p>
|
1486
|
-
A method to convert a <a href="Hash.html">Hash</a> into a
|
1652
|
+
A method to convert a <a href="Hash.html">Hash</a> into a <a
|
1653
|
+
href="Struct.html">Struct</a>.
|
1487
1654
|
</p>
|
1488
1655
|
<pre>
|
1489
1656
|
h = {:name=>"Dan","age"=>33,"rank"=>"SrA","grade"=>"E4"}
|
@@ -1492,13 +1659,13 @@ A method to convert a <a href="Hash.html">Hash</a> into a Struct.
|
|
1492
1659
|
<p>
|
1493
1660
|
TODO: Is this robust enough considerd hashes aren‘t ordered?
|
1494
1661
|
</p>
|
1495
|
-
<
|
1496
|
-
|
1497
|
-
</
|
1662
|
+
<p>
|
1663
|
+
CREDIT: Daniel Berger
|
1664
|
+
</p>
|
1498
1665
|
</div>
|
1499
1666
|
<div class="sourcecode">
|
1500
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1501
|
-
<div id="
|
1667
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000116_source')" id="l_M000116_source">+</a> ]</p>
|
1668
|
+
<div id="M000116_source" class="dyn-source">
|
1502
1669
|
<pre>
|
1503
1670
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/to_struct.rb, line 12</span>
|
1504
1671
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_struct</span>(<span class="ruby-identifier">struct_name</span>)
|
@@ -1510,7 +1677,7 @@ TODO: Is this robust enough considerd hashes aren‘t ordered?
|
|
1510
1677
|
</div>
|
1511
1678
|
<div class="method">
|
1512
1679
|
<div class="title">
|
1513
|
-
<a name="
|
1680
|
+
<a name="M000094"></a><b>traverse</b>(&b)
|
1514
1681
|
</div>
|
1515
1682
|
<div class="description">
|
1516
1683
|
<p>
|
@@ -1532,13 +1699,14 @@ catches subclasses of <a href="Hash.html">Hash</a>.
|
|
1532
1699
|
</p>
|
1533
1700
|
<pre>
|
1534
1701
|
This is probably not the right thing to do and should catch Hashes only (?)
|
1535
|
-
|
1536
|
-
CREDIT: Trans
|
1537
1702
|
</pre>
|
1703
|
+
<p>
|
1704
|
+
CREDIT: Trans
|
1705
|
+
</p>
|
1538
1706
|
</div>
|
1539
1707
|
<div class="sourcecode">
|
1540
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1541
|
-
<div id="
|
1708
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000094_source')" id="l_M000094_source">+</a> ]</p>
|
1709
|
+
<div id="M000094_source" class="dyn-source">
|
1542
1710
|
<pre>
|
1543
1711
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/traverse.rb, line 18</span>
|
1544
1712
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -1555,11 +1723,11 @@ catches subclasses of <a href="Hash.html">Hash</a>.
|
|
1555
1723
|
</div>
|
1556
1724
|
<div class="method">
|
1557
1725
|
<div class="title">
|
1558
|
-
<a name="
|
1726
|
+
<a name="M000095"></a><b>traverse!</b>(&b)
|
1559
1727
|
</div>
|
1560
1728
|
<div class="description">
|
1561
1729
|
<p>
|
1562
|
-
In place version of <a href="Hash.html#
|
1730
|
+
In place version of <a href="Hash.html#M000094">traverse</a>, which
|
1563
1731
|
traverses the hash and its subhashes, executing the given block on the key
|
1564
1732
|
and value.
|
1565
1733
|
</p>
|
@@ -1567,13 +1735,14 @@ and value.
|
|
1567
1735
|
h = { "A"=>"A", "B"=>"B" }
|
1568
1736
|
h.traverse! { |k,v| [k.downcase, v] }
|
1569
1737
|
h #=> { "a"=>"A", "b"=>"B" }
|
1570
|
-
|
1571
|
-
CREDIT: Trans
|
1572
1738
|
</pre>
|
1739
|
+
<p>
|
1740
|
+
CREDIT: Trans
|
1741
|
+
</p>
|
1573
1742
|
</div>
|
1574
1743
|
<div class="sourcecode">
|
1575
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1576
|
-
<div id="
|
1744
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">+</a> ]</p>
|
1745
|
+
<div id="M000095_source" class="dyn-source">
|
1577
1746
|
<pre>
|
1578
1747
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/traverse.rb, line 36</span>
|
1579
1748
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -1585,24 +1754,24 @@ and value.
|
|
1585
1754
|
</div>
|
1586
1755
|
<div class="method">
|
1587
1756
|
<div class="title">
|
1588
|
-
<a name="
|
1757
|
+
<a name="M000128"></a><b>update_each</b>( {|| ...}
|
1589
1758
|
</div>
|
1590
1759
|
<div class="description">
|
1591
1760
|
<p>
|
1592
1761
|
Iterates through each pair and updates a the hash in place. This is
|
1593
1762
|
formally equivalent to mash! But does not use mash to accomplish the task.
|
1594
|
-
Hence <a href="Hash.html#
|
1763
|
+
Hence <a href="Hash.html#M000128">update_each</a> is probably a touch
|
1595
1764
|
faster.
|
1596
1765
|
</p>
|
1597
|
-
<
|
1598
|
-
|
1599
|
-
</
|
1766
|
+
<p>
|
1767
|
+
CREDIT: Trans
|
1768
|
+
</p>
|
1600
1769
|
</div>
|
1601
1770
|
<div class="sourcecode">
|
1602
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1603
|
-
<div id="
|
1771
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000128_source')" id="l_M000128_source">+</a> ]</p>
|
1772
|
+
<div id="M000128_source" class="dyn-source">
|
1604
1773
|
<pre>
|
1605
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/
|
1774
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_each.rb, line 10</span>
|
1606
1775
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
1607
1776
|
<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1608
1777
|
<span class="ruby-identifier">update</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>))
|
@@ -1615,7 +1784,7 @@ faster.
|
|
1615
1784
|
</div>
|
1616
1785
|
<div class="method">
|
1617
1786
|
<div class="title">
|
1618
|
-
<a name="
|
1787
|
+
<a name="M000129"></a><b>update_keys</b>( {|| ...}
|
1619
1788
|
</div>
|
1620
1789
|
<div class="description">
|
1621
1790
|
<p>
|
@@ -1625,15 +1794,16 @@ Iterate over hash updating just the keys.
|
|
1625
1794
|
h = {:a=>1, :b=>2}
|
1626
1795
|
h.update_keys{ |k| "#{k}!" }
|
1627
1796
|
h #=> { "a!"=>1, "b!"=>2 }
|
1628
|
-
|
1629
|
-
CREDIT: Trans
|
1630
1797
|
</pre>
|
1798
|
+
<p>
|
1799
|
+
CREDIT: Trans
|
1800
|
+
</p>
|
1631
1801
|
</div>
|
1632
1802
|
<div class="sourcecode">
|
1633
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1634
|
-
<div id="
|
1803
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000129_source')" id="l_M000129_source">+</a> ]</p>
|
1804
|
+
<div id="M000129_source" class="dyn-source">
|
1635
1805
|
<pre>
|
1636
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/
|
1806
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_keys.rb, line 11</span>
|
1637
1807
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_keys</span> <span class="ruby-comment cmt">#:yield:</span>
|
1638
1808
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1639
1809
|
<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">old_key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">store</span>(<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">old_key</span>), <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">old_key</span>)) }
|
@@ -1647,7 +1817,7 @@ Iterate over hash updating just the keys.
|
|
1647
1817
|
</div>
|
1648
1818
|
<div class="method">
|
1649
1819
|
<div class="title">
|
1650
|
-
<a name="
|
1820
|
+
<a name="M000077"></a><b>update_values</b>( {|| ...}
|
1651
1821
|
</div>
|
1652
1822
|
<div class="description">
|
1653
1823
|
<p>
|
@@ -1657,15 +1827,16 @@ Iterate over hash updating just the values.
|
|
1657
1827
|
h = {:a=>1, :b=>2}
|
1658
1828
|
h.update_values{ |v| v+1 }
|
1659
1829
|
h #=> { a:=>2, :b=>3 }
|
1660
|
-
|
1661
|
-
CREDIT: Trans
|
1662
1830
|
</pre>
|
1831
|
+
<p>
|
1832
|
+
CREDIT: Trans
|
1833
|
+
</p>
|
1663
1834
|
</div>
|
1664
1835
|
<div class="sourcecode">
|
1665
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1666
|
-
<div id="
|
1836
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">+</a> ]</p>
|
1837
|
+
<div id="M000077_source" class="dyn-source">
|
1667
1838
|
<pre>
|
1668
|
-
<span class="ruby-comment cmt"># File lib/core/facets/hash/
|
1839
|
+
<span class="ruby-comment cmt"># File lib/core/facets/hash/update_values.rb, line 11</span>
|
1669
1840
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_values</span> <span class="ruby-comment cmt">#:yield:</span>
|
1670
1841
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1671
1842
|
<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">store</span>(<span class="ruby-identifier">k</span>, <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">v</span>)) }
|
@@ -1679,7 +1850,7 @@ Iterate over hash updating just the values.
|
|
1679
1850
|
</div>
|
1680
1851
|
<div class="method">
|
1681
1852
|
<div class="title">
|
1682
|
-
<a name="
|
1853
|
+
<a name="M000114"></a><b>weave</b>(h)
|
1683
1854
|
</div>
|
1684
1855
|
<div class="description">
|
1685
1856
|
<p>
|
@@ -1721,13 +1892,13 @@ Here is a basic example:
|
|
1721
1892
|
Weave follows the most expected pattern of unifying two complex hashes. It
|
1722
1893
|
is especially useful for implementing overridable configuration schemes.
|
1723
1894
|
</p>
|
1724
|
-
<
|
1725
|
-
|
1726
|
-
</
|
1895
|
+
<p>
|
1896
|
+
CREDIT: Thomas Sawyer
|
1897
|
+
</p>
|
1727
1898
|
</div>
|
1728
1899
|
<div class="sourcecode">
|
1729
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1730
|
-
<div id="
|
1900
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000114_source')" id="l_M000114_source">+</a> ]</p>
|
1901
|
+
<div id="M000114_source" class="dyn-source">
|
1731
1902
|
<pre>
|
1732
1903
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/weave.rb, line 40</span>
|
1733
1904
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weave</span>(<span class="ruby-identifier">h</span>)
|
@@ -1776,19 +1947,19 @@ is especially useful for implementing overridable configuration schemes.
|
|
1776
1947
|
</div>
|
1777
1948
|
<div class="method">
|
1778
1949
|
<div class="title">
|
1779
|
-
<a name="
|
1950
|
+
<a name="M000096"></a><b>|</b>(other)
|
1780
1951
|
</div>
|
1781
1952
|
<div class="description">
|
1782
1953
|
<p>
|
1783
|
-
Operator for <a href="Hash.html#
|
1954
|
+
Operator for <a href="Hash.html#M000091">reverse_merge</a>.
|
1955
|
+
</p>
|
1956
|
+
<p>
|
1957
|
+
CREDIT: Trans
|
1784
1958
|
</p>
|
1785
|
-
<pre>
|
1786
|
-
CREDIT: Trans
|
1787
|
-
</pre>
|
1788
1959
|
</div>
|
1789
1960
|
<div class="sourcecode">
|
1790
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1791
|
-
<div id="
|
1961
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">+</a> ]</p>
|
1962
|
+
<div id="M000096_source" class="dyn-source">
|
1792
1963
|
<pre>
|
1793
1964
|
<span class="ruby-comment cmt"># File lib/core/facets/hash/op_or.rb, line 7</span>
|
1794
1965
|
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">|</span>(<span class="ruby-identifier">other</span>)
|