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
@@ -88,19 +88,20 @@
|
|
88
88
|
<a href="../files/lib/core/facets/kernel/d_rb.html">lib/core/facets/kernel/d.rb</a>
|
89
89
|
<a href="../files/lib/core/facets/kernel/__method___rb.html">lib/core/facets/kernel/__method__.rb</a>
|
90
90
|
<a href="../files/lib/core/facets/kernel/instance_class_rb.html">lib/core/facets/kernel/instance_class.rb</a>
|
91
|
+
<a href="../files/lib/core/facets/kernel/__here___rb.html">lib/core/facets/kernel/__here__.rb</a>
|
91
92
|
<a href="../files/lib/core/facets/kernel/attr_singleton_rb.html">lib/core/facets/kernel/attr_singleton.rb</a>
|
92
93
|
<a href="../files/lib/core/facets/kernel/p_rb.html">lib/core/facets/kernel/p.rb</a>
|
93
94
|
<a href="../files/lib/core/facets/kernel/singleton_class_rb.html">lib/core/facets/kernel/singleton_class.rb</a>
|
94
95
|
<a href="../files/lib/core/facets/kernel/try_rb.html">lib/core/facets/kernel/try.rb</a>
|
95
96
|
<a href="../files/lib/core/facets/kernel/__dir___rb.html">lib/core/facets/kernel/__dir__.rb</a>
|
96
97
|
<a href="../files/lib/core/facets/kernel/returning_rb.html">lib/core/facets/kernel/returning.rb</a>
|
98
|
+
<a href="../files/lib/core/facets/kernel/callstack_rb.html">lib/core/facets/kernel/callstack.rb</a>
|
97
99
|
<a href="../files/lib/core/facets/kernel/populate_rb.html">lib/core/facets/kernel/populate.rb</a>
|
98
100
|
<a href="../files/lib/core/facets/kernel/val_rb.html">lib/core/facets/kernel/val.rb</a>
|
99
101
|
<a href="../files/lib/core/facets/kernel/constant_rb.html">lib/core/facets/kernel/constant.rb</a>
|
100
102
|
<a href="../files/lib/core/facets/kernel/require_local_rb.html">lib/core/facets/kernel/require_local.rb</a>
|
101
103
|
<a href="../files/lib/core/facets/kernel/respond_rb.html">lib/core/facets/kernel/respond.rb</a>
|
102
104
|
<a href="../files/lib/core/facets/kernel/in_rb.html">lib/core/facets/kernel/in.rb</a>
|
103
|
-
<a href="../files/lib/core/facets/callstack_rb.html">lib/core/facets/callstack.rb</a>
|
104
105
|
<a href="../files/lib/core/facets/blank_rb.html">lib/core/facets/blank.rb</a>
|
105
106
|
</td>
|
106
107
|
</tr>
|
@@ -117,72 +118,72 @@
|
|
117
118
|
|
118
119
|
|
119
120
|
<div class="sectiontitle">Methods</div>
|
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="#
|
156
|
-
<span style="padding-right: 5px;"><a href="#
|
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="#
|
168
|
-
<span style="padding-right: 5px;"><a href="#
|
169
|
-
<span style="padding-right: 5px;"><a href="#
|
170
|
-
<span style="padding-right: 5px;"><a href="#
|
171
|
-
<span style="padding-right: 5px;"><a href="#
|
172
|
-
<span style="padding-right: 5px;"><a href="#
|
173
|
-
<span style="padding-right: 5px;"><a href="#
|
174
|
-
<span style="padding-right: 5px;"><a href="#
|
175
|
-
<span style="padding-right: 5px;"><a href="#
|
176
|
-
<span style="padding-right: 5px;"><a href="#
|
177
|
-
<span style="padding-right: 5px;"><a href="#
|
178
|
-
<span style="padding-right: 5px;"><a href="#
|
179
|
-
<span style="padding-right: 5px;"><a href="#
|
180
|
-
<span style="padding-right: 5px;"><a href="#
|
181
|
-
<span style="padding-right: 5px;"><a href="#
|
182
|
-
<span style="padding-right: 5px;"><a href="#
|
183
|
-
<span style="padding-right: 5px;"><a href="#
|
184
|
-
<span style="padding-right: 5px;"><a href="#
|
185
|
-
<span style="padding-right: 5px;"><a href="#
|
121
|
+
<span style="padding-right: 5px;"><a href="#M000356">Bit</a></span>
|
122
|
+
<span style="padding-right: 5px;"><a href="#M000396">__DIR__</a></span>
|
123
|
+
<span style="padding-right: 5px;"><a href="#M000388">__HERE__</a></span>
|
124
|
+
<span style="padding-right: 5px;"><a href="#M000357">as</a></span>
|
125
|
+
<span style="padding-right: 5px;"><a href="#M000361">ask</a></span>
|
126
|
+
<span style="padding-right: 5px;"><a href="#M000391">attr_singleton_accessor</a></span>
|
127
|
+
<span style="padding-right: 5px;"><a href="#M000389">attr_singleton_reader</a></span>
|
128
|
+
<span style="padding-right: 5px;"><a href="#M000390">attr_singleton_writer</a></span>
|
129
|
+
<span style="padding-right: 5px;"><a href="#M000408">blank?</a></span>
|
130
|
+
<span style="padding-right: 5px;"><a href="#M000355">bool?</a></span>
|
131
|
+
<span style="padding-right: 5px;"><a href="#M000398">callstack</a></span>
|
132
|
+
<span style="padding-right: 5px;"><a href="#M000369">complete</a></span>
|
133
|
+
<span style="padding-right: 5px;"><a href="#M000402">constant</a></span>
|
134
|
+
<span style="padding-right: 5px;"><a href="#M000386">d</a></span>
|
135
|
+
<span style="padding-right: 5px;"><a href="#M000372">deep_copy</a></span>
|
136
|
+
<span style="padding-right: 5px;"><a href="#M000350">demand</a></span>
|
137
|
+
<span style="padding-right: 5px;"><a href="#M000362">demo</a></span>
|
138
|
+
<span style="padding-right: 5px;"><a href="#M000348">eigenclass</a></span>
|
139
|
+
<span style="padding-right: 5px;"><a href="#M000378">enable_warnings</a></span>
|
140
|
+
<span style="padding-right: 5px;"><a href="#M000368">ergo</a></span>
|
141
|
+
<span style="padding-right: 5px;"><a href="#M000354">false?</a></span>
|
142
|
+
<span style="padding-right: 5px;"><a href="#M000351">future</a></span>
|
143
|
+
<span style="padding-right: 5px;"><a href="#M000407">in?</a></span>
|
144
|
+
<span style="padding-right: 5px;"><a href="#M000366">instance</a></span>
|
145
|
+
<span style="padding-right: 5px;"><a href="#M000384">instance_assign</a></span>
|
146
|
+
<span style="padding-right: 5px;"><a href="#M000387">instance_class</a></span>
|
147
|
+
<span style="padding-right: 5px;"><a href="#M000383">instance_values</a></span>
|
148
|
+
<span style="padding-right: 5px;"><a href="#M000382">instance_vars</a></span>
|
149
|
+
<span style="padding-right: 5px;"><a href="#M000404">load_local</a></span>
|
150
|
+
<span style="padding-right: 5px;"><a href="#M000363">maybe</a></span>
|
151
|
+
<span style="padding-right: 5px;"><a href="#M000343">meta_alias</a></span>
|
152
|
+
<span style="padding-right: 5px;"><a href="#M000346">meta_class</a></span>
|
153
|
+
<span style="padding-right: 5px;"><a href="#M000345">meta_def</a></span>
|
154
|
+
<span style="padding-right: 5px;"><a href="#M000344">meta_eval</a></span>
|
155
|
+
<span style="padding-right: 5px;"><a href="#M000347">metaclass</a></span>
|
156
|
+
<span style="padding-right: 5px;"><a href="#M000371">non_nil?</a></span>
|
157
|
+
<span style="padding-right: 5px;"><a href="#M000370">not_nil?</a></span>
|
158
|
+
<span style="padding-right: 5px;"><a href="#M000364">object_hexid</a></span>
|
159
|
+
<span style="padding-right: 5px;"><a href="#M000367">object_send</a></span>
|
160
|
+
<span style="padding-right: 5px;"><a href="#M000392">p</a></span>
|
161
|
+
<span style="padding-right: 5px;"><a href="#M000399">populate</a></span>
|
162
|
+
<span style="padding-right: 5px;"><a href="#M000349">promise</a></span>
|
163
|
+
<span style="padding-right: 5px;"><a href="#M000380">qua_class</a></span>
|
164
|
+
<span style="padding-right: 5px;"><a href="#M000379">require_all</a></span>
|
165
|
+
<span style="padding-right: 5px;"><a href="#M000403">require_local</a></span>
|
166
|
+
<span style="padding-right: 5px;"><a href="#M000381">resc</a></span>
|
167
|
+
<span style="padding-right: 5px;"><a href="#M000405">respond</a></span>
|
168
|
+
<span style="padding-right: 5px;"><a href="#M000406">respond_with_value</a></span>
|
169
|
+
<span style="padding-right: 5px;"><a href="#M000397">returning</a></span>
|
170
|
+
<span style="padding-right: 5px;"><a href="#M000358">send_as</a></span>
|
171
|
+
<span style="padding-right: 5px;"><a href="#M000400">set_from</a></span>
|
172
|
+
<span style="padding-right: 5px;"><a href="#M000374">silence_stderr</a></span>
|
173
|
+
<span style="padding-right: 5px;"><a href="#M000375">silence_stdout</a></span>
|
174
|
+
<span style="padding-right: 5px;"><a href="#M000373">silence_stream</a></span>
|
175
|
+
<span style="padding-right: 5px;"><a href="#M000377">silence_warnings</a></span>
|
176
|
+
<span style="padding-right: 5px;"><a href="#M000376">silently</a></span>
|
177
|
+
<span style="padding-right: 5px;"><a href="#M000394">singleton</a></span>
|
178
|
+
<span style="padding-right: 5px;"><a href="#M000393">singleton_class</a></span>
|
179
|
+
<span style="padding-right: 5px;"><a href="#M000360">super_as</a></span>
|
180
|
+
<span style="padding-right: 5px;"><a href="#M000359">super_method</a></span>
|
181
|
+
<span style="padding-right: 5px;"><a href="#M000365">tap</a></span>
|
182
|
+
<span style="padding-right: 5px;"><a href="#M000352">to_b</a></span>
|
183
|
+
<span style="padding-right: 5px;"><a href="#M000353">true?</a></span>
|
184
|
+
<span style="padding-right: 5px;"><a href="#M000395">try</a></span>
|
185
|
+
<span style="padding-right: 5px;"><a href="#M000401">val?</a></span>
|
186
|
+
<span style="padding-right: 5px;"><a href="#M000385">with</a></span>
|
186
187
|
|
187
188
|
|
188
189
|
|
@@ -192,7 +193,7 @@
|
|
192
193
|
<div class="sectiontitle">Public Instance methods</div>
|
193
194
|
<div class="method">
|
194
195
|
<div class="title">
|
195
|
-
<a name="
|
196
|
+
<a name="M000356"></a><b>Bit</b>(n)
|
196
197
|
</div>
|
197
198
|
<div class="description">
|
198
199
|
<p>
|
@@ -206,16 +207,15 @@ Create a single bit bitmask.
|
|
206
207
|
<p>
|
207
208
|
This is equivalent to n-shift: "1 << n".
|
208
209
|
</p>
|
209
|
-
<
|
210
|
-
|
211
|
-
|
212
|
-
</pre>
|
210
|
+
<p>
|
211
|
+
CREDIT: Thomas Sawyer, George Moschovitis
|
212
|
+
</p>
|
213
213
|
</div>
|
214
214
|
<div class="sourcecode">
|
215
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
216
|
-
<div id="
|
215
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000356_source')" id="l_M000356_source">+</a> ]</p>
|
216
|
+
<div id="M000356_source" class="dyn-source">
|
217
217
|
<pre>
|
218
|
-
<span class="ruby-comment cmt"># File lib/core/facets/bitmask.rb, line
|
218
|
+
<span class="ruby-comment cmt"># File lib/core/facets/bitmask.rb, line 97</span>
|
219
219
|
<span class="ruby-keyword kw">def</span> <span class="ruby-constant">Bit</span>(<span class="ruby-identifier">n</span>)
|
220
220
|
<span class="ruby-value">1</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">n</span>)
|
221
221
|
<span class="ruby-keyword kw">end</span>
|
@@ -225,7 +225,7 @@ This is equivalent to n-shift: "1 << n".
|
|
225
225
|
</div>
|
226
226
|
<div class="method">
|
227
227
|
<div class="title">
|
228
|
-
<a name="
|
228
|
+
<a name="M000396"></a><b>__DIR__</b>()
|
229
229
|
</div>
|
230
230
|
<div class="description">
|
231
231
|
<p>
|
@@ -237,8 +237,8 @@ CREDIT: Trans
|
|
237
237
|
</p>
|
238
238
|
</div>
|
239
239
|
<div class="sourcecode">
|
240
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
241
|
-
<div id="
|
240
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000396_source')" id="l_M000396_source">+</a> ]</p>
|
241
|
+
<div id="M000396_source" class="dyn-source">
|
242
242
|
<pre>
|
243
243
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/__dir__.rb, line 8</span>
|
244
244
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__DIR__</span>
|
@@ -250,13 +250,13 @@ CREDIT: Trans
|
|
250
250
|
</div>
|
251
251
|
<div class="method">
|
252
252
|
<div class="title">
|
253
|
-
<a name="
|
253
|
+
<a name="M000388"></a><b>__HERE__</b>()
|
254
254
|
</div>
|
255
255
|
<div class="sourcecode">
|
256
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
257
|
-
<div id="
|
256
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000388_source')" id="l_M000388_source">+</a> ]</p>
|
257
|
+
<div id="M000388_source" class="dyn-source">
|
258
258
|
<pre>
|
259
|
-
<span class="ruby-comment cmt"># File lib/core/facets/kernel/
|
259
|
+
<span class="ruby-comment cmt"># File lib/core/facets/kernel/__here__.rb, line 3</span>
|
260
260
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__HERE__</span>
|
261
261
|
<span class="ruby-node">"#{__FILE__}: #{__LINE__}"</span>
|
262
262
|
<span class="ruby-keyword kw">end</span>
|
@@ -266,7 +266,7 @@ CREDIT: Trans
|
|
266
266
|
</div>
|
267
267
|
<div class="method">
|
268
268
|
<div class="title">
|
269
|
-
<a name="
|
269
|
+
<a name="M000357"></a><b>as</b>(ancestor, &blk)
|
270
270
|
</div>
|
271
271
|
<div class="description">
|
272
272
|
<p>
|
@@ -290,8 +290,8 @@ directly of the given object.
|
|
290
290
|
</pre>
|
291
291
|
</div>
|
292
292
|
<div class="sourcecode">
|
293
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
294
|
-
<div id="
|
293
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000357_source')" id="l_M000357_source">+</a> ]</p>
|
294
|
+
<div id="M000357_source" class="dyn-source">
|
295
295
|
<pre>
|
296
296
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/as.rb, line 22</span>
|
297
297
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">as</span>(<span class="ruby-identifier">ancestor</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -309,7 +309,7 @@ directly of the given object.
|
|
309
309
|
</div>
|
310
310
|
<div class="method">
|
311
311
|
<div class="title">
|
312
|
-
<a name="
|
312
|
+
<a name="M000361"></a><b>ask</b>(question, answers=nil)
|
313
313
|
</div>
|
314
314
|
<div class="description">
|
315
315
|
<p>
|
@@ -331,13 +331,13 @@ Responding:
|
|
331
331
|
$ Are you happy? [Yn] Y <ENTER>
|
332
332
|
</pre>
|
333
333
|
<p>
|
334
|
-
The <a href="Kernel.html#
|
334
|
+
The <a href="Kernel.html#M000361">ask</a> method would return
|
335
335
|
"Y".
|
336
336
|
</p>
|
337
337
|
</div>
|
338
338
|
<div class="sourcecode">
|
339
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
340
|
-
<div id="
|
339
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000361_source')" id="l_M000361_source">+</a> ]</p>
|
340
|
+
<div id="M000361_source" class="dyn-source">
|
341
341
|
<pre>
|
342
342
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/ask.rb, line 19</span>
|
343
343
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ask</span>(<span class="ruby-identifier">question</span>, <span class="ruby-identifier">answers</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -352,12 +352,12 @@ The <a href="Kernel.html#M000355">ask</a> method would return
|
|
352
352
|
</div>
|
353
353
|
<div class="method">
|
354
354
|
<div class="title">
|
355
|
-
<a name="
|
355
|
+
<a name="M000391"></a><b>attr_singleton_accessor</b>(*args)
|
356
356
|
</div>
|
357
357
|
<div class="description">
|
358
358
|
<p>
|
359
|
-
Takes an array or hash <a href="Kernel.html#
|
360
|
-
values and creates <a href="Kernel.html#
|
359
|
+
Takes an array or hash <a href="Kernel.html#M000385">with</a> default
|
360
|
+
values and creates <a href="Kernel.html#M000394">singleton</a>
|
361
361
|
attr_accessors for each.
|
362
362
|
</p>
|
363
363
|
<pre>
|
@@ -368,13 +368,14 @@ attr_accessors for each.
|
|
368
368
|
self.y = 4
|
369
369
|
self.x #=> 3
|
370
370
|
self.y #=> 4
|
371
|
-
|
372
|
-
CREDIT: Trans
|
373
371
|
</pre>
|
372
|
+
<p>
|
373
|
+
CREDIT: Trans
|
374
|
+
</p>
|
374
375
|
</div>
|
375
376
|
<div class="sourcecode">
|
376
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
377
|
-
<div id="
|
377
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000391_source')" id="l_M000391_source">+</a> ]</p>
|
378
|
+
<div id="M000391_source" class="dyn-source">
|
378
379
|
<pre>
|
379
380
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/attr_singleton.rb, line 54</span>
|
380
381
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_singleton_accessor</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -389,12 +390,12 @@ attr_accessors for each.
|
|
389
390
|
</div>
|
390
391
|
<div class="method">
|
391
392
|
<div class="title">
|
392
|
-
<a name="
|
393
|
+
<a name="M000389"></a><b>attr_singleton_reader</b>(*args)
|
393
394
|
</div>
|
394
395
|
<div class="description">
|
395
396
|
<p>
|
396
|
-
Takes an array or a hash <a href="Kernel.html#
|
397
|
-
values and creates <a href="Kernel.html#
|
397
|
+
Takes an array or a hash <a href="Kernel.html#M000385">with</a> default
|
398
|
+
values and creates <a href="Kernel.html#M000394">singleton</a> attr_readers
|
398
399
|
for each.
|
399
400
|
</p>
|
400
401
|
<pre>
|
@@ -403,18 +404,19 @@ for each.
|
|
403
404
|
@y #=> 2
|
404
405
|
self.x #=> 1
|
405
406
|
self.y #=> 2
|
406
|
-
|
407
|
-
CREDIT: Trans
|
408
407
|
</pre>
|
408
|
+
<p>
|
409
|
+
CREDIT: Trans
|
410
|
+
</p>
|
409
411
|
</div>
|
410
412
|
<div class="sourcecode">
|
411
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
412
|
-
<div id="
|
413
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000389_source')" id="l_M000389_source">+</a> ]</p>
|
414
|
+
<div id="M000389_source" class="dyn-source">
|
413
415
|
<pre>
|
414
416
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/attr_singleton.rb, line 14</span>
|
415
417
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_singleton_reader</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
416
418
|
<span class="ruby-comment cmt">#h, a = *args.partition{|a| Hash===a}</span>
|
417
|
-
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span> ; <span class="ruby-keyword kw">self</span> ; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">send</span>( <span class="ruby-identifier">:attr_reader</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
419
|
+
(<span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span> ; <span class="ruby-keyword kw">self</span> ; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">send</span>( <span class="ruby-identifier">:attr_reader</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
418
420
|
<span class="ruby-comment cmt">#(class << self ; self ; end).send( :attr_reader, *h.keys )</span>
|
419
421
|
<span class="ruby-comment cmt">#h.each { |k,v| instance_variable_set("@#{k}", v) }</span>
|
420
422
|
<span class="ruby-keyword kw">end</span>
|
@@ -424,12 +426,12 @@ for each.
|
|
424
426
|
</div>
|
425
427
|
<div class="method">
|
426
428
|
<div class="title">
|
427
|
-
<a name="
|
429
|
+
<a name="M000390"></a><b>attr_singleton_writer</b>(*args)
|
428
430
|
</div>
|
429
431
|
<div class="description">
|
430
432
|
<p>
|
431
|
-
Takes an array or a hash <a href="Kernel.html#
|
432
|
-
values and creates <a href="Kernel.html#
|
433
|
+
Takes an array or a hash <a href="Kernel.html#M000385">with</a> default
|
434
|
+
values and creates <a href="Kernel.html#M000394">singleton</a> attr_writers
|
433
435
|
for each.
|
434
436
|
</p>
|
435
437
|
<pre>
|
@@ -440,13 +442,14 @@ for each.
|
|
440
442
|
self.y = 4
|
441
443
|
@x #=> 3
|
442
444
|
@y #=> 4
|
443
|
-
|
444
|
-
CREDIT: Trans
|
445
445
|
</pre>
|
446
|
+
<p>
|
447
|
+
CREDIT: Trans
|
448
|
+
</p>
|
446
449
|
</div>
|
447
450
|
<div class="sourcecode">
|
448
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
449
|
-
<div id="
|
451
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000390_source')" id="l_M000390_source">+</a> ]</p>
|
452
|
+
<div id="M000390_source" class="dyn-source">
|
450
453
|
<pre>
|
451
454
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/attr_singleton.rb, line 34</span>
|
452
455
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_singleton_writer</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -461,7 +464,7 @@ for each.
|
|
461
464
|
</div>
|
462
465
|
<div class="method">
|
463
466
|
<div class="title">
|
464
|
-
<a name="
|
467
|
+
<a name="M000408"></a><b>blank?</b>()
|
465
468
|
</div>
|
466
469
|
<div class="description">
|
467
470
|
<p>
|
@@ -482,8 +485,8 @@ to
|
|
482
485
|
</pre>
|
483
486
|
</div>
|
484
487
|
<div class="sourcecode">
|
485
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
486
|
-
<div id="
|
488
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000408_source')" id="l_M000408_source">+</a> ]</p>
|
489
|
+
<div id="M000408_source" class="dyn-source">
|
487
490
|
<pre>
|
488
491
|
<span class="ruby-comment cmt"># File lib/core/facets/blank.rb, line 14</span>
|
489
492
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">blank?</span>
|
@@ -495,7 +498,7 @@ to
|
|
495
498
|
</div>
|
496
499
|
<div class="method">
|
497
500
|
<div class="title">
|
498
|
-
<a name="
|
501
|
+
<a name="M000355"></a><b>bool?</b>()
|
499
502
|
</div>
|
500
503
|
<div class="description">
|
501
504
|
<p>
|
@@ -509,8 +512,8 @@ or <a href="FalseClass.html">FalseClass</a>, otherwise false.
|
|
509
512
|
</pre>
|
510
513
|
</div>
|
511
514
|
<div class="sourcecode">
|
512
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
513
|
-
<div id="
|
515
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000355_source')" id="l_M000355_source">+</a> ]</p>
|
516
|
+
<div id="M000355_source" class="dyn-source">
|
514
517
|
<pre>
|
515
518
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 127</span>
|
516
519
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bool?</span>
|
@@ -522,12 +525,12 @@ or <a href="FalseClass.html">FalseClass</a>, otherwise false.
|
|
522
525
|
</div>
|
523
526
|
<div class="method">
|
524
527
|
<div class="title">
|
525
|
-
<a name="
|
528
|
+
<a name="M000398"></a><b>callstack</b>( level = 1 )
|
526
529
|
</div>
|
527
530
|
<div class="description">
|
528
531
|
<p>
|
529
532
|
Parse a caller string and break it into its components, <a
|
530
|
-
href="Kernel.html#
|
533
|
+
href="Kernel.html#M000397">returning</a> an array. Returns:
|
531
534
|
</p>
|
532
535
|
<ul>
|
533
536
|
<li>file (<a href="String.html">String</a>)
|
@@ -561,15 +564,15 @@ Note: If the user decides to redefine caller() to output data in a
|
|
561
564
|
different format, <em>prior</em> to requiring this, then the results will
|
562
565
|
be indeterminate.
|
563
566
|
</p>
|
564
|
-
<
|
565
|
-
|
566
|
-
</
|
567
|
+
<p>
|
568
|
+
CREDIT: Trans
|
569
|
+
</p>
|
567
570
|
</div>
|
568
571
|
<div class="sourcecode">
|
569
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
570
|
-
<div id="
|
572
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000398_source')" id="l_M000398_source">+</a> ]</p>
|
573
|
+
<div id="M000398_source" class="dyn-source">
|
571
574
|
<pre>
|
572
|
-
<span class="ruby-comment cmt"># File lib/core/facets/callstack.rb, line 27</span>
|
575
|
+
<span class="ruby-comment cmt"># File lib/core/facets/kernel/callstack.rb, line 27</span>
|
573
576
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callstack</span>( <span class="ruby-identifier">level</span> = <span class="ruby-value">1</span> )
|
574
577
|
<span class="ruby-identifier">call_str_array</span> = <span class="ruby-identifier">pp_callstack</span>(<span class="ruby-identifier">level</span>)
|
575
578
|
<span class="ruby-identifier">stack</span> = []
|
@@ -588,7 +591,7 @@ be indeterminate.
|
|
588
591
|
</div>
|
589
592
|
<div class="method">
|
590
593
|
<div class="title">
|
591
|
-
<a name="
|
594
|
+
<a name="M000369"></a><b>complete</b>() {|| ...}
|
592
595
|
</div>
|
593
596
|
<div class="description">
|
594
597
|
<p>
|
@@ -600,13 +603,14 @@ Repeat loop until it yeilds false or nil.
|
|
600
603
|
b << a.pop
|
601
604
|
end
|
602
605
|
b #=> [3, 2, 1, nil]
|
603
|
-
|
604
|
-
CREDIT: Trans
|
605
606
|
</pre>
|
607
|
+
<p>
|
608
|
+
CREDIT: Trans
|
609
|
+
</p>
|
606
610
|
</div>
|
607
611
|
<div class="sourcecode">
|
608
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
609
|
-
<div id="
|
612
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000369_source')" id="l_M000369_source">+</a> ]</p>
|
613
|
+
<div id="M000369_source" class="dyn-source">
|
610
614
|
<pre>
|
611
615
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/complete.rb, line 13</span>
|
612
616
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">complete</span>
|
@@ -618,7 +622,7 @@ Repeat loop until it yeilds false or nil.
|
|
618
622
|
</div>
|
619
623
|
<div class="method">
|
620
624
|
<div class="title">
|
621
|
-
<a name="
|
625
|
+
<a name="M000402"></a><b>constant</b>(const)
|
622
626
|
</div>
|
623
627
|
<div class="description">
|
624
628
|
<p>
|
@@ -635,13 +639,14 @@ unlike <tt>const_get</tt>, can handle module hierarchy.
|
|
635
639
|
require 'test/unit'
|
636
640
|
Test.constant("Unit::Assertions") # -> Test::Unit::Assertions
|
637
641
|
Test.constant("::Test::Unit") # -> Test::Unit
|
638
|
-
|
639
|
-
CREDIT: Trans
|
640
642
|
</pre>
|
643
|
+
<p>
|
644
|
+
CREDIT: Trans
|
645
|
+
</p>
|
641
646
|
</div>
|
642
647
|
<div class="sourcecode">
|
643
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
644
|
-
<div id="
|
648
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000402_source')" id="l_M000402_source">+</a> ]</p>
|
649
|
+
<div id="M000402_source" class="dyn-source">
|
645
650
|
<pre>
|
646
651
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/constant.rb, line 18</span>
|
647
652
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">constant</span>(<span class="ruby-identifier">const</span>)
|
@@ -655,11 +660,11 @@ unlike <tt>const_get</tt>, can handle module hierarchy.
|
|
655
660
|
</div>
|
656
661
|
<div class="method">
|
657
662
|
<div class="title">
|
658
|
-
<a name="
|
663
|
+
<a name="M000386"></a><b>d</b>(*x)
|
659
664
|
</div>
|
660
665
|
<div class="description">
|
661
666
|
<p>
|
662
|
-
Like <a href="Kernel.html#
|
667
|
+
Like <a href="Kernel.html#M000392">p</a> but gives file and line number.
|
663
668
|
</p>
|
664
669
|
<pre>
|
665
670
|
d("hi")
|
@@ -672,17 +677,15 @@ produces
|
|
672
677
|
"hi"
|
673
678
|
</pre>
|
674
679
|
<p>
|
675
|
-
TODO: This is borderline "prime". Keep here?
|
680
|
+
TODO: This is borderline "prime". Keep here? Another copy of it
|
681
|
+
exits in dtools.rb
|
676
682
|
</p>
|
677
|
-
<pre>
|
678
|
-
Another copy of it exits in dtools.rb
|
679
|
-
</pre>
|
680
683
|
</div>
|
681
684
|
<div class="sourcecode">
|
682
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
683
|
-
<div id="
|
685
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000386_source')" id="l_M000386_source">+</a> ]</p>
|
686
|
+
<div id="M000386_source" class="dyn-source">
|
684
687
|
<pre>
|
685
|
-
<span class="ruby-comment cmt"># File lib/core/facets/kernel/d.rb, line
|
688
|
+
<span class="ruby-comment cmt"># File lib/core/facets/kernel/d.rb, line 15</span>
|
686
689
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">d</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">x</span>)
|
687
690
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{__FILE__}, #{__LINE__}"</span>
|
688
691
|
<span class="ruby-identifier">x</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">inspect</span> } <span class="ruby-comment cmt">#p(*x)</span>
|
@@ -694,20 +697,20 @@ TODO: This is borderline "prime". Keep here?
|
|
694
697
|
</div>
|
695
698
|
<div class="method">
|
696
699
|
<div class="title">
|
697
|
-
<a name="
|
700
|
+
<a name="M000372"></a><b>deep_copy</b>()
|
698
701
|
</div>
|
699
702
|
<div class="description">
|
700
703
|
<p>
|
701
704
|
Anything that can be marshaled can be copied in totality. This is also
|
702
|
-
commonly called a <a href="Kernel.html#
|
705
|
+
commonly called a <a href="Kernel.html#M000372">deep_copy</a>.
|
703
706
|
</p>
|
704
707
|
<pre>
|
705
708
|
"ABC".copy #=> "ABC"
|
706
709
|
</pre>
|
707
710
|
</div>
|
708
711
|
<div class="sourcecode">
|
709
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
710
|
-
<div id="
|
712
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000372_source')" id="l_M000372_source">+</a> ]</p>
|
713
|
+
<div id="M000372_source" class="dyn-source">
|
711
714
|
<pre>
|
712
715
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/deep_copy.rb, line 8</span>
|
713
716
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deep_copy</span>
|
@@ -719,24 +722,24 @@ commonly called a <a href="Kernel.html#M000366">deep_copy</a>.
|
|
719
722
|
</div>
|
720
723
|
<div class="method">
|
721
724
|
<div class="title">
|
722
|
-
<a name="
|
725
|
+
<a name="M000350"></a><b>demand</b>( promise )
|
723
726
|
</div>
|
724
727
|
<div class="description">
|
725
728
|
<p>
|
726
|
-
Forces the result of a <a href="Kernel.html#
|
729
|
+
Forces the result of a <a href="Kernel.html#M000349">promise</a> to be
|
727
730
|
computed (if necessary) and returns the bare result object. Once evaluated,
|
728
|
-
the result of the <a href="Kernel.html#
|
731
|
+
the result of the <a href="Kernel.html#M000349">promise</a> will be cached.
|
729
732
|
Nested promises will be evaluated together, until the first non-<a
|
730
|
-
href="Kernel.html#
|
733
|
+
href="Kernel.html#M000349">promise</a> result.
|
731
734
|
</p>
|
732
735
|
<p>
|
733
736
|
If called on a value that is not a <a
|
734
|
-
href="Kernel.html#
|
737
|
+
href="Kernel.html#M000349">promise</a>, it will simply return it.
|
735
738
|
</p>
|
736
739
|
</div>
|
737
740
|
<div class="sourcecode">
|
738
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
739
|
-
<div id="
|
741
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000350_source')" id="l_M000350_source">+</a> ]</p>
|
742
|
+
<div id="M000350_source" class="dyn-source">
|
740
743
|
<pre>
|
741
744
|
<span class="ruby-comment cmt"># File lib/core/facets/lazy.rb, line 219</span>
|
742
745
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">demand</span>( <span class="ruby-identifier">promise</span> )
|
@@ -752,7 +755,7 @@ href="Kernel.html#M000343">promise</a>, it will simply return it.
|
|
752
755
|
</div>
|
753
756
|
<div class="method">
|
754
757
|
<div class="title">
|
755
|
-
<a name="
|
758
|
+
<a name="M000362"></a><b>demo</b>(out=$stdout,&block)
|
756
759
|
</div>
|
757
760
|
<div class="description">
|
758
761
|
<p>
|
@@ -771,14 +774,15 @@ Produces:
|
|
771
774
|
a = [1,2,3] #=> [1, 2, 3]
|
772
775
|
a.slice(1,2) #=> [2, 3]
|
773
776
|
a.map { |x| x**3 } #=> [1, 8, 27]
|
774
|
-
|
775
|
-
TODO: Is there a way to do this without the eval string in block?
|
776
|
-
Preferably just a block and no string.
|
777
777
|
</pre>
|
778
|
+
<p>
|
779
|
+
TODO: Is there a way to do this without the eval string in block?
|
780
|
+
Preferably just a block and no string.
|
781
|
+
</p>
|
778
782
|
</div>
|
779
783
|
<div class="sourcecode">
|
780
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
781
|
-
<div id="
|
784
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000362_source')" id="l_M000362_source">+</a> ]</p>
|
785
|
+
<div id="M000362_source" class="dyn-source">
|
782
786
|
<pre>
|
783
787
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/demo.rb, line 19</span>
|
784
788
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">demo</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stdout</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -790,26 +794,27 @@ Produces:
|
|
790
794
|
</div>
|
791
795
|
<div class="method">
|
792
796
|
<div class="title">
|
793
|
-
<a name="
|
797
|
+
<a name="M000348"></a><b>eigenclass</b>()
|
794
798
|
</div>
|
795
799
|
<div class="description">
|
796
800
|
<p>
|
797
801
|
During this trying time when no one can get their techie catchwords to
|
798
802
|
stick to the refrigerator no matter how hard they slap it # <a
|
799
|
-
href="Kernel.html#
|
803
|
+
href="Kernel.html#M000385">with</a> the enchanted magnetic spatula, it’s
|
800
804
|
good to know that the contrived phrases really do fly, graceful and
|
801
805
|
unclasped and bearing north toward chilled shrimp. I know what my
|
802
806
|
Hallowe’en pumpkin is going to say.
|
803
807
|
</p>
|
804
808
|
<pre>
|
805
809
|
-- why the lucky stiff
|
806
|
-
|
807
|
-
CREDIT: WhyTheLuckyStiff
|
808
810
|
</pre>
|
811
|
+
<p>
|
812
|
+
CREDIT: WhyTheLuckyStiff
|
813
|
+
</p>
|
809
814
|
</div>
|
810
815
|
<div class="sourcecode">
|
811
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
812
|
-
<div id="
|
816
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000348_source')" id="l_M000348_source">+</a> ]</p>
|
817
|
+
<div id="M000348_source" class="dyn-source">
|
813
818
|
<pre>
|
814
819
|
<span class="ruby-comment cmt"># File lib/core/facets/metaid.rb, line 69</span>
|
815
820
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eigenclass</span>
|
@@ -821,20 +826,20 @@ Hallowe’en pumpkin is going to say.
|
|
821
826
|
</div>
|
822
827
|
<div class="method">
|
823
828
|
<div class="title">
|
824
|
-
<a name="
|
829
|
+
<a name="M000378"></a><b>enable_warnings</b>() {|| ...}
|
825
830
|
</div>
|
826
831
|
<div class="description">
|
827
832
|
<p>
|
828
833
|
Sets $VERBOSE to true for the duration of the block and back to its
|
829
834
|
original value afterwards.
|
830
835
|
</p>
|
831
|
-
<
|
832
|
-
|
833
|
-
</
|
836
|
+
<p>
|
837
|
+
CREDIT: David Heinemeier Hansson
|
838
|
+
</p>
|
834
839
|
</div>
|
835
840
|
<div class="sourcecode">
|
836
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
837
|
-
<div id="
|
841
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000378_source')" id="l_M000378_source">+</a> ]</p>
|
842
|
+
<div id="M000378_source" class="dyn-source">
|
838
843
|
<pre>
|
839
844
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 67</span>
|
840
845
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">enable_warnings</span>
|
@@ -849,7 +854,7 @@ original value afterwards.
|
|
849
854
|
</div>
|
850
855
|
<div class="method">
|
851
856
|
<div class="title">
|
852
|
-
<a name="
|
857
|
+
<a name="M000368"></a><b>ergo</b>() {|self| ...}
|
853
858
|
</div>
|
854
859
|
<div class="description">
|
855
860
|
<p>
|
@@ -863,16 +868,16 @@ Yield self -or- return self.
|
|
863
868
|
nil.ergo{ |o| o.foobar } #=> nil
|
864
869
|
</pre>
|
865
870
|
<p>
|
866
|
-
This is like <a href="Kernel.html#
|
867
|
-
href="Kernel.html#
|
871
|
+
This is like <a href="Kernel.html#M000365">tap</a>, but <a
|
872
|
+
href="Kernel.html#M000365">tap</a> yields self -and- returns self.
|
873
|
+
</p>
|
874
|
+
<p>
|
875
|
+
CREDIT: Daniel DeLorme
|
868
876
|
</p>
|
869
|
-
<pre>
|
870
|
-
CREDIT: Daniel DeLorme
|
871
|
-
</pre>
|
872
877
|
</div>
|
873
878
|
<div class="sourcecode">
|
874
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
875
|
-
<div id="
|
879
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000368_source')" id="l_M000368_source">+</a> ]</p>
|
880
|
+
<div id="M000368_source" class="dyn-source">
|
876
881
|
<pre>
|
877
882
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/ergo.rb, line 17</span>
|
878
883
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ergo</span> <span class="ruby-operator">&</span><span class="ruby-identifier">b</span>
|
@@ -888,7 +893,7 @@ href="Kernel.html#M000359">tap</a> yields self -and- returns self.
|
|
888
893
|
</div>
|
889
894
|
<div class="method">
|
890
895
|
<div class="title">
|
891
|
-
<a name="
|
896
|
+
<a name="M000354"></a><b>false?</b>()
|
892
897
|
</div>
|
893
898
|
<div class="description">
|
894
899
|
<p>
|
@@ -902,8 +907,8 @@ href="FalseClass.html">FalseClass</a>, otherwise false.
|
|
902
907
|
</pre>
|
903
908
|
</div>
|
904
909
|
<div class="sourcecode">
|
905
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
906
|
-
<div id="
|
910
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000354_source')" id="l_M000354_source">+</a> ]</p>
|
911
|
+
<div id="M000354_source" class="dyn-source">
|
907
912
|
<pre>
|
908
913
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 116</span>
|
909
914
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">false?</span>
|
@@ -915,25 +920,25 @@ href="FalseClass.html">FalseClass</a>, otherwise false.
|
|
915
920
|
</div>
|
916
921
|
<div class="method">
|
917
922
|
<div class="title">
|
918
|
-
<a name="
|
923
|
+
<a name="M000351"></a><b>future</b>( ) {|result| ...}
|
919
924
|
</div>
|
920
925
|
<div class="description">
|
921
926
|
<p>
|
922
927
|
Schedules a computation to be run asynchronously in a background thread and
|
923
|
-
returns a <a href="Kernel.html#
|
924
|
-
attempt to <a href="Kernel.html#
|
925
|
-
href="Kernel.html#
|
928
|
+
returns a <a href="Kernel.html#M000349">promise</a> for its result. An
|
929
|
+
attempt to <a href="Kernel.html#M000350">demand</a> the result of the <a
|
930
|
+
href="Kernel.html#M000349">promise</a> will block until the computation
|
926
931
|
finishes.
|
927
932
|
</p>
|
928
933
|
<p>
|
929
|
-
As <a href="Kernel.html#
|
930
|
-
href="Kernel.html#
|
931
|
-
href="Kernel.html#
|
934
|
+
As <a href="Kernel.html#M000385">with</a> <a
|
935
|
+
href="Kernel.html#M000349">Kernel.promise</a>, this passes the block a <a
|
936
|
+
href="Kernel.html#M000349">promise</a> for its own result. Use wisely.
|
932
937
|
</p>
|
933
938
|
</div>
|
934
939
|
<div class="sourcecode">
|
935
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
936
|
-
<div id="
|
940
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000351_source')" id="l_M000351_source">+</a> ]</p>
|
941
|
+
<div id="M000351_source" class="dyn-source">
|
937
942
|
<pre>
|
938
943
|
<span class="ruby-comment cmt"># File lib/core/facets/lazy.rb, line 234</span>
|
939
944
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">future</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">computation</span> ) <span class="ruby-comment cmt">#:yields: result</span>
|
@@ -945,7 +950,7 @@ href="Kernel.html#M000343">promise</a> for its own result. Use wisely.
|
|
945
950
|
</div>
|
946
951
|
<div class="method">
|
947
952
|
<div class="title">
|
948
|
-
<a name="
|
953
|
+
<a name="M000407"></a><b>in?</b>(other)
|
949
954
|
</div>
|
950
955
|
<div class="description">
|
951
956
|
<p>
|
@@ -957,8 +962,8 @@ Is self included in other?
|
|
957
962
|
</pre>
|
958
963
|
</div>
|
959
964
|
<div class="sourcecode">
|
960
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
961
|
-
<div id="
|
965
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000407_source')" id="l_M000407_source">+</a> ]</p>
|
966
|
+
<div id="M000407_source" class="dyn-source">
|
962
967
|
<pre>
|
963
968
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/in.rb, line 8</span>
|
964
969
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in?</span>(<span class="ruby-identifier">other</span>)
|
@@ -970,12 +975,12 @@ Is self included in other?
|
|
970
975
|
</div>
|
971
976
|
<div class="method">
|
972
977
|
<div class="title">
|
973
|
-
<a name="
|
978
|
+
<a name="M000366"></a><b>instance</b>()
|
974
979
|
</div>
|
975
980
|
<div class="description">
|
976
981
|
<p>
|
977
|
-
Access internals of an object <a href="Kernel.html#
|
978
|
-
href="Kernel.html#
|
982
|
+
Access internals of an object <a href="Kernel.html#M000357">as</a> if <a
|
983
|
+
href="Kernel.html#M000385">with</a> private access.
|
979
984
|
</p>
|
980
985
|
<pre>
|
981
986
|
class X
|
@@ -984,8 +989,8 @@ href="Kernel.html#M000379">with</a> private access.
|
|
984
989
|
</pre>
|
985
990
|
</div>
|
986
991
|
<div class="sourcecode">
|
987
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
988
|
-
<div id="
|
992
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000366_source')" id="l_M000366_source">+</a> ]</p>
|
993
|
+
<div id="M000366_source" class="dyn-source">
|
989
994
|
<pre>
|
990
995
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/instance.rb, line 12</span>
|
991
996
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance</span>
|
@@ -999,11 +1004,11 @@ href="Kernel.html#M000379">with</a> private access.
|
|
999
1004
|
</div>
|
1000
1005
|
<div class="method">
|
1001
1006
|
<div class="title">
|
1002
|
-
<a name="
|
1007
|
+
<a name="M000384"></a><b>instance_assign</b>(hash)
|
1003
1008
|
</div>
|
1004
1009
|
<div class="description">
|
1005
1010
|
<p>
|
1006
|
-
Set <a href="Kernel.html#
|
1011
|
+
Set <a href="Kernel.html#M000366">instance</a> variables using a hash.
|
1007
1012
|
</p>
|
1008
1013
|
<pre>
|
1009
1014
|
instance_assign('@a'=>1, '@b'=>2)
|
@@ -1011,13 +1016,13 @@ Set <a href="Kernel.html#M000360">instance</a> variables using a hash.
|
|
1011
1016
|
@b #=> 2
|
1012
1017
|
</pre>
|
1013
1018
|
<p>
|
1014
|
-
WARNING: <a href="Kernel.html#
|
1019
|
+
WARNING: <a href="Kernel.html#M000384">instance_assign</a> will be
|
1015
1020
|
deprecated. Use instance_vars.update instead.
|
1016
1021
|
</p>
|
1017
1022
|
</div>
|
1018
1023
|
<div class="sourcecode">
|
1019
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1020
|
-
<div id="
|
1024
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000384_source')" id="l_M000384_source">+</a> ]</p>
|
1025
|
+
<div id="M000384_source" class="dyn-source">
|
1021
1026
|
<pre>
|
1022
1027
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/instance_assign.rb, line 32</span>
|
1023
1028
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_assign</span>(<span class="ruby-identifier">hash</span>)
|
@@ -1033,25 +1038,26 @@ deprecated. Use instance_vars.update instead.
|
|
1033
1038
|
</div>
|
1034
1039
|
<div class="method">
|
1035
1040
|
<div class="title">
|
1036
|
-
<a name="
|
1041
|
+
<a name="M000387"></a><b>instance_class</b>(&block)
|
1037
1042
|
</div>
|
1038
1043
|
<div class="description">
|
1039
1044
|
<p>
|
1040
1045
|
Easy access to an object qua class, otherwise known <a
|
1041
|
-
href="Kernel.html#
|
1042
|
-
href="Kernel.html#
|
1043
|
-
href="Kernel.html#
|
1046
|
+
href="Kernel.html#M000357">as</a> the object‘s <a
|
1047
|
+
href="Kernel.html#M000347">metaclass</a> or <a
|
1048
|
+
href="Kernel.html#M000394">singleton</a> class. This implemnetation alwasy
|
1044
1049
|
returns the class, even if a block is provided to eval against it.
|
1045
1050
|
</p>
|
1046
1051
|
<pre>
|
1047
1052
|
It is what it is.
|
1048
|
-
|
1049
|
-
CREDIT: Trans
|
1050
1053
|
</pre>
|
1054
|
+
<p>
|
1055
|
+
CREDIT: Trans
|
1056
|
+
</p>
|
1051
1057
|
</div>
|
1052
1058
|
<div class="sourcecode">
|
1053
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1054
|
-
<div id="
|
1059
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000387_source')" id="l_M000387_source">+</a> ]</p>
|
1060
|
+
<div id="M000387_source" class="dyn-source">
|
1055
1061
|
<pre>
|
1056
1062
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/instance_class.rb, line 19</span>
|
1057
1063
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_class</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1064,11 +1070,11 @@ returns the class, even if a block is provided to eval against it.
|
|
1064
1070
|
</div>
|
1065
1071
|
<div class="method">
|
1066
1072
|
<div class="title">
|
1067
|
-
<a name="
|
1073
|
+
<a name="M000383"></a><b>instance_values</b>()
|
1068
1074
|
</div>
|
1069
1075
|
<div class="description">
|
1070
1076
|
<p>
|
1071
|
-
Return <a href="Kernel.html#
|
1077
|
+
Return <a href="Kernel.html#M000366">instance</a> variable values in an
|
1072
1078
|
array.
|
1073
1079
|
</p>
|
1074
1080
|
<pre>
|
@@ -1083,13 +1089,13 @@ array.
|
|
1083
1089
|
x.instance_values #=> { "a"=>1, "b"=>2 }
|
1084
1090
|
</pre>
|
1085
1091
|
<p>
|
1086
|
-
WARNING: <a href="Kernel.html#
|
1092
|
+
WARNING: <a href="Kernel.html#M000383">instance_values</a> will be
|
1087
1093
|
deprecated. Use instance_vars.to_hash instead.
|
1088
1094
|
</p>
|
1089
1095
|
</div>
|
1090
1096
|
<div class="sourcecode">
|
1091
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1092
|
-
<div id="
|
1097
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000383_source')" id="l_M000383_source">+</a> ]</p>
|
1098
|
+
<div id="M000383_source" class="dyn-source">
|
1093
1099
|
<pre>
|
1094
1100
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/instance_assign.rb, line 17</span>
|
1095
1101
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_values</span>
|
@@ -1104,11 +1110,11 @@ deprecated. Use instance_vars.to_hash instead.
|
|
1104
1110
|
</div>
|
1105
1111
|
<div class="method">
|
1106
1112
|
<div class="title">
|
1107
|
-
<a name="
|
1113
|
+
<a name="M000382"></a><b>instance_vars</b>()
|
1108
1114
|
</div>
|
1109
1115
|
<div class="sourcecode">
|
1110
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1111
|
-
<div id="
|
1116
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000382_source')" id="l_M000382_source">+</a> ]</p>
|
1117
|
+
<div id="M000382_source" class="dyn-source">
|
1112
1118
|
<pre>
|
1113
1119
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/instance_variables.rb, line 3</span>
|
1114
1120
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_vars</span>
|
@@ -1120,11 +1126,11 @@ deprecated. Use instance_vars.to_hash instead.
|
|
1120
1126
|
</div>
|
1121
1127
|
<div class="method">
|
1122
1128
|
<div class="title">
|
1123
|
-
<a name="
|
1129
|
+
<a name="M000404"></a><b>load_local</b>(fname, safe=nil)
|
1124
1130
|
</div>
|
1125
1131
|
<div class="description">
|
1126
1132
|
<p>
|
1127
|
-
Load file from same dir <a href="Kernel.html#
|
1133
|
+
Load file from same dir <a href="Kernel.html#M000357">as</a> calling
|
1128
1134
|
script.
|
1129
1135
|
</p>
|
1130
1136
|
<pre>
|
@@ -1132,8 +1138,8 @@ script.
|
|
1132
1138
|
</pre>
|
1133
1139
|
</div>
|
1134
1140
|
<div class="sourcecode">
|
1135
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1136
|
-
<div id="
|
1141
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000404_source')" id="l_M000404_source">+</a> ]</p>
|
1142
|
+
<div id="M000404_source" class="dyn-source">
|
1137
1143
|
<pre>
|
1138
1144
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/require_local.rb, line 17</span>
|
1139
1145
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_local</span>(<span class="ruby-identifier">fname</span>, <span class="ruby-identifier">safe</span>=<span class="ruby-keyword kw">nil</span>)
|
@@ -1147,7 +1153,7 @@ script.
|
|
1147
1153
|
</div>
|
1148
1154
|
<div class="method">
|
1149
1155
|
<div class="title">
|
1150
|
-
<a name="
|
1156
|
+
<a name="M000363"></a><b>maybe</b>(chance = 0.5) {|if rand < chance| ...}
|
1151
1157
|
</div>
|
1152
1158
|
<div class="description">
|
1153
1159
|
<p>
|
@@ -1160,8 +1166,8 @@ a 50/50 chance to being executed.
|
|
1160
1166
|
</pre>
|
1161
1167
|
</div>
|
1162
1168
|
<div class="sourcecode">
|
1163
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1164
|
-
<div id="
|
1169
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000363_source')" id="l_M000363_source">+</a> ]</p>
|
1170
|
+
<div id="M000363_source" class="dyn-source">
|
1165
1171
|
<pre>
|
1166
1172
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/maybe.rb, line 9</span>
|
1167
1173
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">maybe</span>(<span class="ruby-identifier">chance</span> = <span class="ruby-value">0</span><span class="ruby-value">.5</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1177,24 +1183,25 @@ a 50/50 chance to being executed.
|
|
1177
1183
|
</div>
|
1178
1184
|
<div class="method">
|
1179
1185
|
<div class="title">
|
1180
|
-
<a name="
|
1186
|
+
<a name="M000343"></a><b>meta_alias</b>(*args)
|
1181
1187
|
</div>
|
1182
1188
|
<div class="description">
|
1183
1189
|
<p>
|
1184
|
-
Alias a method defined in the <a href="Kernel.html#
|
1185
|
-
(ie. <a href="Kernel.html#
|
1190
|
+
Alias a method defined in the <a href="Kernel.html#M000347">metaclass</a>
|
1191
|
+
(ie. <a href="Kernel.html#M000394">singleton</a> class).
|
1186
1192
|
</p>
|
1187
1193
|
<pre>
|
1188
1194
|
def X.y?; "y?" ; end
|
1189
1195
|
X.meta_alias "ynot?", "y?"
|
1190
1196
|
X.ynot? #=> y?
|
1191
|
-
|
1192
|
-
CREDIT: Trans
|
1193
1197
|
</pre>
|
1198
|
+
<p>
|
1199
|
+
CREDIT: Trans
|
1200
|
+
</p>
|
1194
1201
|
</div>
|
1195
1202
|
<div class="sourcecode">
|
1196
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1197
|
-
<div id="
|
1203
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000343_source')" id="l_M000343_source">+</a> ]</p>
|
1204
|
+
<div id="M000343_source" class="dyn-source">
|
1198
1205
|
<pre>
|
1199
1206
|
<span class="ruby-comment cmt"># File lib/core/facets/metaid.rb, line 11</span>
|
1200
1207
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">meta_alias</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -1208,23 +1215,23 @@ Alias a method defined in the <a href="Kernel.html#M000341">metaclass</a>
|
|
1208
1215
|
</div>
|
1209
1216
|
<div class="method">
|
1210
1217
|
<div class="title">
|
1211
|
-
<a name="
|
1218
|
+
<a name="M000346"></a><b>meta_class</b>(&block)
|
1212
1219
|
</div>
|
1213
1220
|
<div class="description">
|
1214
1221
|
<p>
|
1215
1222
|
Easy access to an object‘s "special" class, otherwise known
|
1216
|
-
<a href="Kernel.html#
|
1217
|
-
href="Kernel.html#
|
1218
|
-
href="Kernel.html#
|
1223
|
+
<a href="Kernel.html#M000357">as</a> it‘s <a
|
1224
|
+
href="Kernel.html#M000347">metaclass</a> or <a
|
1225
|
+
href="Kernel.html#M000394">singleton</a> class.
|
1219
1226
|
</p>
|
1220
1227
|
</div>
|
1221
1228
|
<div class="aka">
|
1222
1229
|
This method is also aliased as
|
1223
|
-
<a href="Kernel.html#
|
1230
|
+
<a href="Kernel.html#M000347">metaclass</a>
|
1224
1231
|
</div>
|
1225
1232
|
<div class="sourcecode">
|
1226
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1227
|
-
<div id="
|
1233
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000346_source')" id="l_M000346_source">+</a> ]</p>
|
1234
|
+
<div id="M000346_source" class="dyn-source">
|
1228
1235
|
<pre>
|
1229
1236
|
<span class="ruby-comment cmt"># File lib/core/facets/metaid.rb, line 47</span>
|
1230
1237
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">meta_class</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1240,24 +1247,25 @@ href="Kernel.html#M000388">singleton</a> class.
|
|
1240
1247
|
</div>
|
1241
1248
|
<div class="method">
|
1242
1249
|
<div class="title">
|
1243
|
-
<a name="
|
1250
|
+
<a name="M000345"></a><b>meta_def</b>( name, &block )
|
1244
1251
|
</div>
|
1245
1252
|
<div class="description">
|
1246
1253
|
<p>
|
1247
1254
|
Add method to a meta-class —i.e. a <a
|
1248
|
-
href="Kernel.html#
|
1255
|
+
href="Kernel.html#M000394">singleton</a> method.
|
1249
1256
|
</p>
|
1250
1257
|
<pre>
|
1251
1258
|
class X; end
|
1252
1259
|
X.meta_def(:x){"x"}
|
1253
1260
|
X.x #=> "x"
|
1254
|
-
|
1255
|
-
CREDIT: WhyTheLuckyStiff
|
1256
1261
|
</pre>
|
1262
|
+
<p>
|
1263
|
+
CREDIT: WhyTheLuckyStiff
|
1264
|
+
</p>
|
1257
1265
|
</div>
|
1258
1266
|
<div class="sourcecode">
|
1259
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1260
|
-
<div id="
|
1267
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000345_source')" id="l_M000345_source">+</a> ]</p>
|
1268
|
+
<div id="M000345_source" class="dyn-source">
|
1261
1269
|
<pre>
|
1262
1270
|
<span class="ruby-comment cmt"># File lib/core/facets/metaid.rb, line 38</span>
|
1263
1271
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">meta_def</span>( <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
@@ -1271,20 +1279,20 @@ href="Kernel.html#M000388">singleton</a> method.
|
|
1271
1279
|
</div>
|
1272
1280
|
<div class="method">
|
1273
1281
|
<div class="title">
|
1274
|
-
<a name="
|
1282
|
+
<a name="M000344"></a><b>meta_eval</b>(str=nil, &blk)
|
1275
1283
|
</div>
|
1276
1284
|
<div class="description">
|
1277
1285
|
<p>
|
1278
|
-
Evaluate code in a <a href="Kernel.html#
|
1286
|
+
Evaluate code in a <a href="Kernel.html#M000347">metaclass</a>. This is
|
1279
1287
|
equivalent to ‘meta_class.instance_eval’.
|
1280
1288
|
</p>
|
1281
|
-
<
|
1282
|
-
|
1283
|
-
</
|
1289
|
+
<p>
|
1290
|
+
CREDIT: WhyTheLuckyStiff
|
1291
|
+
</p>
|
1284
1292
|
</div>
|
1285
1293
|
<div class="sourcecode">
|
1286
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1287
|
-
<div id="
|
1294
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000344_source')" id="l_M000344_source">+</a> ]</p>
|
1295
|
+
<div id="M000344_source" class="dyn-source">
|
1288
1296
|
<pre>
|
1289
1297
|
<span class="ruby-comment cmt"># File lib/core/facets/metaid.rb, line 22</span>
|
1290
1298
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">meta_eval</span>(<span class="ruby-identifier">str</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -1300,17 +1308,17 @@ equivalent to ‘meta_class.instance_eval’.
|
|
1300
1308
|
</div>
|
1301
1309
|
<div class="method">
|
1302
1310
|
<div class="title">
|
1303
|
-
<a name="
|
1311
|
+
<a name="M000347"></a><b>metaclass</b>(&block)
|
1304
1312
|
</div>
|
1305
1313
|
<div class="description">
|
1306
1314
|
<p>
|
1307
|
-
Alias for <a href="Kernel.html#
|
1315
|
+
Alias for <a href="Kernel.html#M000346">meta_class</a>
|
1308
1316
|
</p>
|
1309
1317
|
</div>
|
1310
1318
|
</div>
|
1311
1319
|
<div class="method">
|
1312
1320
|
<div class="title">
|
1313
|
-
<a name="
|
1321
|
+
<a name="M000371"></a><b>non_nil?</b>()
|
1314
1322
|
</div>
|
1315
1323
|
<div class="description">
|
1316
1324
|
<p>
|
@@ -1320,7 +1328,7 @@ Alias for not_nil?
|
|
1320
1328
|
</div>
|
1321
1329
|
<div class="method">
|
1322
1330
|
<div class="title">
|
1323
|
-
<a name="
|
1331
|
+
<a name="M000370"></a><b>not_nil?</b>()
|
1324
1332
|
</div>
|
1325
1333
|
<div class="description">
|
1326
1334
|
<p>
|
@@ -1329,17 +1337,18 @@ The opposite of nil?.
|
|
1329
1337
|
<pre>
|
1330
1338
|
"hello".not_nil? # -> true
|
1331
1339
|
nil.not_nil? # -> false
|
1332
|
-
|
1333
|
-
CREDIT: Gavin Sinclair
|
1334
1340
|
</pre>
|
1341
|
+
<p>
|
1342
|
+
CREDIT: Gavin Sinclair
|
1343
|
+
</p>
|
1335
1344
|
</div>
|
1336
1345
|
<div class="aka">
|
1337
1346
|
This method is also aliased as
|
1338
|
-
<a href="Kernel.html#
|
1347
|
+
<a href="Kernel.html#M000371">non_nil?</a>
|
1339
1348
|
</div>
|
1340
1349
|
<div class="sourcecode">
|
1341
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1342
|
-
<div id="
|
1350
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000370_source')" id="l_M000370_source">+</a> ]</p>
|
1351
|
+
<div id="M000370_source" class="dyn-source">
|
1343
1352
|
<pre>
|
1344
1353
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/not_nil.rb, line 10</span>
|
1345
1354
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">not_nil?</span>
|
@@ -1351,21 +1360,21 @@ The opposite of nil?.
|
|
1351
1360
|
</div>
|
1352
1361
|
<div class="method">
|
1353
1362
|
<div class="title">
|
1354
|
-
<a name="
|
1363
|
+
<a name="M000364"></a><b>object_hexid</b>()
|
1355
1364
|
</div>
|
1356
1365
|
<div class="description">
|
1357
1366
|
<p>
|
1358
|
-
Returns the object id <a href="Kernel.html#
|
1367
|
+
Returns the object id <a href="Kernel.html#M000357">as</a> a string in
|
1359
1368
|
hexideciaml, which is how Ruby reports them <a
|
1360
|
-
href="Kernel.html#
|
1369
|
+
href="Kernel.html#M000385">with</a> inspect.
|
1361
1370
|
</p>
|
1362
1371
|
<pre>
|
1363
1372
|
"ABC".object_hexid #=> "0x402d359c"
|
1364
1373
|
</pre>
|
1365
1374
|
</div>
|
1366
1375
|
<div class="sourcecode">
|
1367
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1368
|
-
<div id="
|
1376
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000364_source')" id="l_M000364_source">+</a> ]</p>
|
1377
|
+
<div id="M000364_source" class="dyn-source">
|
1369
1378
|
<pre>
|
1370
1379
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/object_hexid.rb, line 8</span>
|
1371
1380
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_hexid</span>
|
@@ -1377,7 +1386,7 @@ href="Kernel.html#M000379">with</a> inspect.
|
|
1377
1386
|
</div>
|
1378
1387
|
<div class="method">
|
1379
1388
|
<div class="title">
|
1380
|
-
<a name="
|
1389
|
+
<a name="M000367"></a><b>object_send</b>(name,*args,&blk)
|
1381
1390
|
</div>
|
1382
1391
|
<div class="description">
|
1383
1392
|
<p>
|
@@ -1393,16 +1402,16 @@ Send only to public methods.
|
|
1393
1402
|
=> NoMethodError: private method `foo' called for #<X:0xb7ac6ba8>
|
1394
1403
|
</pre>
|
1395
1404
|
<p>
|
1396
|
-
TODO: <a href="Kernel.html#
|
1405
|
+
TODO: <a href="Kernel.html#M000367">object_send</a> needs to change for
|
1397
1406
|
1.9.
|
1398
1407
|
</p>
|
1399
|
-
<
|
1400
|
-
|
1401
|
-
</
|
1408
|
+
<p>
|
1409
|
+
CREDIT: Trans
|
1410
|
+
</p>
|
1402
1411
|
</div>
|
1403
1412
|
<div class="sourcecode">
|
1404
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1405
|
-
<div id="
|
1413
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000367_source')" id="l_M000367_source">+</a> ]</p>
|
1414
|
+
<div id="M000367_source" class="dyn-source">
|
1406
1415
|
<pre>
|
1407
1416
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/object_send.rb, line 20</span>
|
1408
1417
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">object_send</span>(<span class="ruby-identifier">name</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -1421,11 +1430,11 @@ TODO: <a href="Kernel.html#M000361">object_send</a> needs to change for
|
|
1421
1430
|
</div>
|
1422
1431
|
<div class="method">
|
1423
1432
|
<div class="title">
|
1424
|
-
<a name="
|
1433
|
+
<a name="M000392"></a><b>p</b>(*x)
|
1425
1434
|
</div>
|
1426
1435
|
<div class="description">
|
1427
1436
|
<p>
|
1428
|
-
Alternate to standard <a href="Kernel.html#
|
1437
|
+
Alternate to standard <a href="Kernel.html#M000392">p</a> method that
|
1429
1438
|
outputs Kernel#inspect to stdout, but also passes through the orginal
|
1430
1439
|
argument(s).
|
1431
1440
|
</p>
|
@@ -1442,13 +1451,13 @@ produces
|
|
1442
1451
|
5
|
1443
1452
|
</pre>
|
1444
1453
|
<p>
|
1445
|
-
DEPRECATE
|
1446
|
-
|
1454
|
+
TODO: DEPRECATE <a href="Kernel.html#M000357">as</a> of 1.9, <em>if</em> it
|
1455
|
+
will do this.
|
1447
1456
|
</p>
|
1448
1457
|
</div>
|
1449
1458
|
<div class="sourcecode">
|
1450
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1451
|
-
<div id="
|
1459
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000392_source')" id="l_M000392_source">+</a> ]</p>
|
1460
|
+
<div id="M000392_source" class="dyn-source">
|
1452
1461
|
<pre>
|
1453
1462
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/p.rb, line 18</span>
|
1454
1463
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">p</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">x</span>)
|
@@ -1461,7 +1470,7 @@ then do this too.
|
|
1461
1470
|
</div>
|
1462
1471
|
<div class="method">
|
1463
1472
|
<div class="title">
|
1464
|
-
<a name="
|
1473
|
+
<a name="M000399"></a><b>populate</b>(data=nil) {|| ...}
|
1465
1474
|
</div>
|
1466
1475
|
<div class="description">
|
1467
1476
|
<p>
|
@@ -1475,7 +1484,7 @@ Assign via accessor methods using a hash, associative array or block.
|
|
1475
1484
|
object.populate{ |s| s.a = 1; s.b = 2 }
|
1476
1485
|
</pre>
|
1477
1486
|
<p>
|
1478
|
-
These are all the same <a href="Kernel.html#
|
1487
|
+
These are all the same <a href="Kernel.html#M000357">as</a> doing:
|
1479
1488
|
</p>
|
1480
1489
|
<pre>
|
1481
1490
|
object.a = 1
|
@@ -1493,8 +1502,8 @@ TODO: Better name, set_with ?
|
|
1493
1502
|
</p>
|
1494
1503
|
</div>
|
1495
1504
|
<div class="sourcecode">
|
1496
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1497
|
-
<div id="
|
1505
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000399_source')" id="l_M000399_source">+</a> ]</p>
|
1506
|
+
<div id="M000399_source" class="dyn-source">
|
1498
1507
|
<pre>
|
1499
1508
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/populate.rb, line 25</span>
|
1500
1509
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">populate</span>(<span class="ruby-identifier">data</span>=<span class="ruby-keyword kw">nil</span>) <span class="ruby-comment cmt">#:yield:</span>
|
@@ -1512,34 +1521,34 @@ TODO: Better name, set_with ?
|
|
1512
1521
|
</div>
|
1513
1522
|
<div class="method">
|
1514
1523
|
<div class="title">
|
1515
|
-
<a name="
|
1524
|
+
<a name="M000349"></a><b>promise</b>( ) {|result| ...}
|
1516
1525
|
</div>
|
1517
1526
|
<div class="description">
|
1518
1527
|
<p>
|
1519
|
-
The <a href="Kernel.html#
|
1520
|
-
<a href="Kernel.html#
|
1521
|
-
href="Kernel.html#
|
1522
|
-
returns a <a href="Kernel.html#
|
1523
|
-
provided block at a <a href="Kernel.html#
|
1528
|
+
The <a href="Kernel.html#M000349">promise</a>() function is used together
|
1529
|
+
<a href="Kernel.html#M000385">with</a> <a
|
1530
|
+
href="Kernel.html#M000350">demand</a>() to implement lazy evaluation. It
|
1531
|
+
returns a <a href="Kernel.html#M000349">promise</a> to evaluate the
|
1532
|
+
provided block at a <a href="Kernel.html#M000351">future</a> time.
|
1524
1533
|
Evaluation can be demanded and the block‘s result obtained via the <a
|
1525
|
-
href="Kernel.html#
|
1534
|
+
href="Kernel.html#M000350">demand</a>() function.
|
1526
1535
|
</p>
|
1527
1536
|
<p>
|
1528
1537
|
Implicit evaluation is also supported: the first message sent to it will <a
|
1529
|
-
href="Kernel.html#
|
1538
|
+
href="Kernel.html#M000350">demand</a> evaluation, after which that message
|
1530
1539
|
and any subsequent messages will be forwarded to the result object.
|
1531
1540
|
</p>
|
1532
1541
|
<p>
|
1533
1542
|
As an aid to circular programming, the block will be passed a <a
|
1534
|
-
href="Kernel.html#
|
1543
|
+
href="Kernel.html#M000349">promise</a> for its own result when it is
|
1535
1544
|
evaluated. Be careful not to force that <a
|
1536
|
-
href="Kernel.html#
|
1545
|
+
href="Kernel.html#M000349">promise</a> during the computation, lest the
|
1537
1546
|
computation diverge.
|
1538
1547
|
</p>
|
1539
1548
|
</div>
|
1540
1549
|
<div class="sourcecode">
|
1541
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1542
|
-
<div id="
|
1550
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000349_source')" id="l_M000349_source">+</a> ]</p>
|
1551
|
+
<div id="M000349_source" class="dyn-source">
|
1543
1552
|
<pre>
|
1544
1553
|
<span class="ruby-comment cmt"># File lib/core/facets/lazy.rb, line 208</span>
|
1545
1554
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">promise</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">computation</span> ) <span class="ruby-comment cmt">#:yields: result</span>
|
@@ -1551,24 +1560,24 @@ computation diverge.
|
|
1551
1560
|
</div>
|
1552
1561
|
<div class="method">
|
1553
1562
|
<div class="title">
|
1554
|
-
<a name="
|
1563
|
+
<a name="M000380"></a><b>qua_class</b>(&block)
|
1555
1564
|
</div>
|
1556
1565
|
<div class="description">
|
1557
1566
|
<p>
|
1558
1567
|
Easy access to an object qua class, otherwise known <a
|
1559
|
-
href="Kernel.html#
|
1560
|
-
href="Kernel.html#
|
1568
|
+
href="Kernel.html#M000357">as</a> the object‘s <a
|
1569
|
+
href="Kernel.html#M000394">singleton</a> class.
|
1561
1570
|
</p>
|
1562
1571
|
<p>
|
1563
1572
|
Yes, another one.
|
1564
1573
|
</p>
|
1565
|
-
<
|
1566
|
-
|
1567
|
-
</
|
1574
|
+
<p>
|
1575
|
+
CREDIT: Trans
|
1576
|
+
</p>
|
1568
1577
|
</div>
|
1569
1578
|
<div class="sourcecode">
|
1570
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1571
|
-
<div id="
|
1579
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000380_source')" id="l_M000380_source">+</a> ]</p>
|
1580
|
+
<div id="M000380_source" class="dyn-source">
|
1572
1581
|
<pre>
|
1573
1582
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/qua_class.rb, line 10</span>
|
1574
1583
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">qua_class</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -1584,20 +1593,20 @@ Yes, another one.
|
|
1584
1593
|
</div>
|
1585
1594
|
<div class="method">
|
1586
1595
|
<div class="title">
|
1587
|
-
<a name="
|
1596
|
+
<a name="M000379"></a><b>require_all</b>(pat)
|
1588
1597
|
</div>
|
1589
1598
|
<div class="description">
|
1590
1599
|
<p>
|
1591
1600
|
Require a pattern of files. This make is easy to require an entire
|
1592
|
-
directory, for <a href="Kernel.html#
|
1601
|
+
directory, for <a href="Kernel.html#M000366">instance</a>.
|
1593
1602
|
</p>
|
1594
1603
|
<pre>
|
1595
1604
|
require_all 'facets/time/*'
|
1596
1605
|
</pre>
|
1597
1606
|
</div>
|
1598
1607
|
<div class="sourcecode">
|
1599
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1600
|
-
<div id="
|
1608
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000379_source')" id="l_M000379_source">+</a> ]</p>
|
1609
|
+
<div id="M000379_source" class="dyn-source">
|
1601
1610
|
<pre>
|
1602
1611
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/require_all.rb, line 8</span>
|
1603
1612
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_all</span>(<span class="ruby-identifier">pat</span>)
|
@@ -1617,11 +1626,11 @@ directory, for <a href="Kernel.html#M000360">instance</a>.
|
|
1617
1626
|
</div>
|
1618
1627
|
<div class="method">
|
1619
1628
|
<div class="title">
|
1620
|
-
<a name="
|
1629
|
+
<a name="M000403"></a><b>require_local</b>(fname)
|
1621
1630
|
</div>
|
1622
1631
|
<div class="description">
|
1623
1632
|
<p>
|
1624
|
-
Require file from same dir <a href="Kernel.html#
|
1633
|
+
Require file from same dir <a href="Kernel.html#M000357">as</a> calling
|
1625
1634
|
script.
|
1626
1635
|
</p>
|
1627
1636
|
<pre>
|
@@ -1629,8 +1638,8 @@ script.
|
|
1629
1638
|
</pre>
|
1630
1639
|
</div>
|
1631
1640
|
<div class="sourcecode">
|
1632
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1633
|
-
<div id="
|
1641
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000403_source')" id="l_M000403_source">+</a> ]</p>
|
1642
|
+
<div id="M000403_source" class="dyn-source">
|
1634
1643
|
<pre>
|
1635
1644
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/require_local.rb, line 7</span>
|
1636
1645
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require_local</span>(<span class="ruby-identifier">fname</span>)
|
@@ -1644,7 +1653,7 @@ script.
|
|
1644
1653
|
</div>
|
1645
1654
|
<div class="method">
|
1646
1655
|
<div class="title">
|
1647
|
-
<a name="
|
1656
|
+
<a name="M000381"></a><b>resc</b>(str)
|
1648
1657
|
</div>
|
1649
1658
|
<div class="description">
|
1650
1659
|
<p>
|
@@ -1654,13 +1663,14 @@ Provides a shortcut to the Regexp.escape module method.
|
|
1654
1663
|
resc("H..LO") #=> "H\\.\\.LO"
|
1655
1664
|
|
1656
1665
|
TODO: Should this be deprecated in favor of String#to_re/to_rx ?
|
1657
|
-
|
1658
|
-
CREDIT: Trans
|
1659
1666
|
</pre>
|
1667
|
+
<p>
|
1668
|
+
CREDIT: Trans
|
1669
|
+
</p>
|
1660
1670
|
</div>
|
1661
1671
|
<div class="sourcecode">
|
1662
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1663
|
-
<div id="
|
1672
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000381_source')" id="l_M000381_source">+</a> ]</p>
|
1673
|
+
<div id="M000381_source" class="dyn-source">
|
1664
1674
|
<pre>
|
1665
1675
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/resc.rb, line 11</span>
|
1666
1676
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resc</span>(<span class="ruby-identifier">str</span>)
|
@@ -1672,12 +1682,12 @@ Provides a shortcut to the Regexp.escape module method.
|
|
1672
1682
|
</div>
|
1673
1683
|
<div class="method">
|
1674
1684
|
<div class="title">
|
1675
|
-
<a name="
|
1685
|
+
<a name="M000405"></a><b>respond</b>(sym, *args)
|
1676
1686
|
</div>
|
1677
1687
|
<div class="description">
|
1678
1688
|
<p>
|
1679
1689
|
Like respond_to? but returns the result of the call if it does indeed <a
|
1680
|
-
href="Kernel.html#
|
1690
|
+
href="Kernel.html#M000405">respond</a>.
|
1681
1691
|
</p>
|
1682
1692
|
<pre>
|
1683
1693
|
class X
|
@@ -1687,17 +1697,18 @@ href="Kernel.html#M000398">respond</a>.
|
|
1687
1697
|
x = X.new
|
1688
1698
|
x.respond(:f) #=> "f"
|
1689
1699
|
x.respond(:g) #=> nil
|
1690
|
-
|
1691
|
-
CREDIT: Trans
|
1692
1700
|
</pre>
|
1701
|
+
<p>
|
1702
|
+
CREDIT: Trans
|
1703
|
+
</p>
|
1693
1704
|
</div>
|
1694
1705
|
<div class="aka">
|
1695
1706
|
This method is also aliased as
|
1696
|
-
<a href="Kernel.html#
|
1707
|
+
<a href="Kernel.html#M000406">respond_with_value</a>
|
1697
1708
|
</div>
|
1698
1709
|
<div class="sourcecode">
|
1699
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1700
|
-
<div id="
|
1710
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000405_source')" id="l_M000405_source">+</a> ]</p>
|
1711
|
+
<div id="M000405_source" class="dyn-source">
|
1701
1712
|
<pre>
|
1702
1713
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/respond.rb, line 16</span>
|
1703
1714
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
@@ -1710,17 +1721,17 @@ href="Kernel.html#M000398">respond</a>.
|
|
1710
1721
|
</div>
|
1711
1722
|
<div class="method">
|
1712
1723
|
<div class="title">
|
1713
|
-
<a name="
|
1724
|
+
<a name="M000406"></a><b>respond_with_value</b>(sym, *args)
|
1714
1725
|
</div>
|
1715
1726
|
<div class="description">
|
1716
1727
|
<p>
|
1717
|
-
Alias for <a href="Kernel.html#
|
1728
|
+
Alias for <a href="Kernel.html#M000405">respond</a>
|
1718
1729
|
</p>
|
1719
1730
|
</div>
|
1720
1731
|
</div>
|
1721
1732
|
<div class="method">
|
1722
1733
|
<div class="title">
|
1723
|
-
<a name="
|
1734
|
+
<a name="M000397"></a><b>returning</b>(obj=self) {|| ...}
|
1724
1735
|
</div>
|
1725
1736
|
<div class="description">
|
1726
1737
|
<p>
|
@@ -1733,20 +1744,20 @@ A Ruby-ized realization of the K combinator.
|
|
1733
1744
|
end
|
1734
1745
|
</pre>
|
1735
1746
|
<p>
|
1736
|
-
Technically, <a href="Kernel.html#
|
1747
|
+
Technically, <a href="Kernel.html#M000397">returning</a> probably should
|
1737
1748
|
force the return of the stated object irregardless of any return statements
|
1738
1749
|
that might appear within it‘s block. This might differentiate <a
|
1739
|
-
href="Kernel.html#
|
1740
|
-
href="Kernel.html#
|
1750
|
+
href="Kernel.html#M000397">returning</a> from <a
|
1751
|
+
href="Kernel.html#M000385">with</a>, however it also would require
|
1741
1752
|
implementation in Ruby itself.
|
1742
1753
|
</p>
|
1743
|
-
<
|
1744
|
-
|
1745
|
-
</
|
1754
|
+
<p>
|
1755
|
+
CREDIT: Mikael Brockman
|
1756
|
+
</p>
|
1746
1757
|
</div>
|
1747
1758
|
<div class="sourcecode">
|
1748
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1749
|
-
<div id="
|
1759
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000397_source')" id="l_M000397_source">+</a> ]</p>
|
1760
|
+
<div id="M000397_source" class="dyn-source">
|
1750
1761
|
<pre>
|
1751
1762
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/returning.rb, line 18</span>
|
1752
1763
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">returning</span>(<span class="ruby-identifier">obj</span>=<span class="ruby-keyword kw">self</span>) <span class="ruby-comment cmt">#:yield:</span>
|
@@ -1759,7 +1770,7 @@ implementation in Ruby itself.
|
|
1759
1770
|
</div>
|
1760
1771
|
<div class="method">
|
1761
1772
|
<div class="title">
|
1762
|
-
<a name="
|
1773
|
+
<a name="M000358"></a><b>send_as</b>(ancestor, sym, *args, &blk)
|
1763
1774
|
</div>
|
1764
1775
|
<div class="description">
|
1765
1776
|
<p>
|
@@ -1770,8 +1781,8 @@ TODO: Does this have the proper scope for send?
|
|
1770
1781
|
</p>
|
1771
1782
|
</div>
|
1772
1783
|
<div class="sourcecode">
|
1773
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1774
|
-
<div id="
|
1784
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000358_source')" id="l_M000358_source">+</a> ]</p>
|
1785
|
+
<div id="M000358_source" class="dyn-source">
|
1775
1786
|
<pre>
|
1776
1787
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/as.rb, line 36</span>
|
1777
1788
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_as</span>(<span class="ruby-identifier">ancestor</span>, <span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -1783,7 +1794,7 @@ TODO: Does this have the proper scope for send?
|
|
1783
1794
|
</div>
|
1784
1795
|
<div class="method">
|
1785
1796
|
<div class="title">
|
1786
|
-
<a name="
|
1797
|
+
<a name="M000400"></a><b>set_from</b>(obj, *fields)
|
1787
1798
|
</div>
|
1788
1799
|
<div class="description">
|
1789
1800
|
<p>
|
@@ -1806,12 +1817,12 @@ Set setter methods using a another object.
|
|
1806
1817
|
obj2.b #=> 2
|
1807
1818
|
</pre>
|
1808
1819
|
<p>
|
1809
|
-
TODO:
|
1820
|
+
TODO: populate_from(obj) ?
|
1810
1821
|
</p>
|
1811
1822
|
</div>
|
1812
1823
|
<div class="sourcecode">
|
1813
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1814
|
-
<div id="
|
1824
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000400_source')" id="l_M000400_source">+</a> ]</p>
|
1825
|
+
<div id="M000400_source" class="dyn-source">
|
1815
1826
|
<pre>
|
1816
1827
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/populate.rb, line 54</span>
|
1817
1828
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_from</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">fields</span>)
|
@@ -1837,11 +1848,11 @@ TODO: pepulate_from(obj) ?
|
|
1837
1848
|
</div>
|
1838
1849
|
<div class="method">
|
1839
1850
|
<div class="title">
|
1840
|
-
<a name="
|
1851
|
+
<a name="M000374"></a><b>silence_stderr</b>( {|| ...}
|
1841
1852
|
</div>
|
1842
1853
|
<div class="sourcecode">
|
1843
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1844
|
-
<div id="
|
1854
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000374_source')" id="l_M000374_source">+</a> ]</p>
|
1855
|
+
<div id="M000374_source" class="dyn-source">
|
1845
1856
|
<pre>
|
1846
1857
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 27</span>
|
1847
1858
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silence_stderr</span> <span class="ruby-comment cmt">#:yeild:</span>
|
@@ -1853,11 +1864,11 @@ TODO: pepulate_from(obj) ?
|
|
1853
1864
|
</div>
|
1854
1865
|
<div class="method">
|
1855
1866
|
<div class="title">
|
1856
|
-
<a name="
|
1867
|
+
<a name="M000375"></a><b>silence_stdout</b>( {|| ...}
|
1857
1868
|
</div>
|
1858
1869
|
<div class="sourcecode">
|
1859
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1860
|
-
<div id="
|
1870
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000375_source')" id="l_M000375_source">+</a> ]</p>
|
1871
|
+
<div id="M000375_source" class="dyn-source">
|
1861
1872
|
<pre>
|
1862
1873
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 32</span>
|
1863
1874
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silence_stdout</span> <span class="ruby-comment cmt">#:yeild:</span>
|
@@ -1869,7 +1880,7 @@ TODO: pepulate_from(obj) ?
|
|
1869
1880
|
</div>
|
1870
1881
|
<div class="method">
|
1871
1882
|
<div class="title">
|
1872
|
-
<a name="
|
1883
|
+
<a name="M000373"></a><b>silence_stream</b>(*streams) {|| ...}
|
1873
1884
|
</div>
|
1874
1885
|
<div class="description">
|
1875
1886
|
<p>
|
@@ -1881,13 +1892,14 @@ Silences any stream for the duration of the block.
|
|
1881
1892
|
end
|
1882
1893
|
|
1883
1894
|
puts 'But this will'
|
1884
|
-
|
1885
|
-
CREDIT: David Heinemeier Hansson
|
1886
1895
|
</pre>
|
1896
|
+
<p>
|
1897
|
+
CREDIT: David Heinemeier Hansson
|
1898
|
+
</p>
|
1887
1899
|
</div>
|
1888
1900
|
<div class="sourcecode">
|
1889
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1890
|
-
<div id="
|
1901
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000373_source')" id="l_M000373_source">+</a> ]</p>
|
1902
|
+
<div id="M000373_source" class="dyn-source">
|
1891
1903
|
<pre>
|
1892
1904
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 13</span>
|
1893
1905
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silence_stream</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">streams</span>) <span class="ruby-comment cmt">#:yeild:</span>
|
@@ -1908,7 +1920,7 @@ Silences any stream for the duration of the block.
|
|
1908
1920
|
</div>
|
1909
1921
|
<div class="method">
|
1910
1922
|
<div class="title">
|
1911
|
-
<a name="
|
1923
|
+
<a name="M000377"></a><b>silence_warnings</b>() {|| ...}
|
1912
1924
|
</div>
|
1913
1925
|
<div class="description">
|
1914
1926
|
<p>
|
@@ -1921,13 +1933,14 @@ value afterwards.
|
|
1921
1933
|
end
|
1922
1934
|
|
1923
1935
|
noisy_call # no warning is voiced
|
1924
|
-
|
1925
|
-
CREDIT: David Heinemeier Hansson
|
1926
1936
|
</pre>
|
1937
|
+
<p>
|
1938
|
+
CREDIT: David Heinemeier Hansson
|
1939
|
+
</p>
|
1927
1940
|
</div>
|
1928
1941
|
<div class="sourcecode">
|
1929
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1930
|
-
<div id="
|
1942
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000377_source')" id="l_M000377_source">+</a> ]</p>
|
1943
|
+
<div id="M000377_source" class="dyn-source">
|
1931
1944
|
<pre>
|
1932
1945
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 55</span>
|
1933
1946
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silence_warnings</span>
|
@@ -1942,17 +1955,17 @@ value afterwards.
|
|
1942
1955
|
</div>
|
1943
1956
|
<div class="method">
|
1944
1957
|
<div class="title">
|
1945
|
-
<a name="
|
1958
|
+
<a name="M000376"></a><b>silently</b>(*streams) {|| ...}
|
1946
1959
|
</div>
|
1947
1960
|
<div class="description">
|
1948
1961
|
<p>
|
1949
|
-
Just like <a href="Kernel.html#
|
1962
|
+
Just like <a href="Kernel.html#M000373">silence_stream</a>, but will
|
1950
1963
|
default to STDOUT, STDERR if no streams are given.
|
1951
1964
|
</p>
|
1952
1965
|
</div>
|
1953
1966
|
<div class="sourcecode">
|
1954
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1955
|
-
<div id="
|
1967
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000376_source')" id="l_M000376_source">+</a> ]</p>
|
1968
|
+
<div id="M000376_source" class="dyn-source">
|
1956
1969
|
<pre>
|
1957
1970
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/silence.rb, line 39</span>
|
1958
1971
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">silently</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">streams</span>) <span class="ruby-comment cmt">#:yeild:</span>
|
@@ -1965,17 +1978,17 @@ default to STDOUT, STDERR if no streams are given.
|
|
1965
1978
|
</div>
|
1966
1979
|
<div class="method">
|
1967
1980
|
<div class="title">
|
1968
|
-
<a name="
|
1981
|
+
<a name="M000394"></a><b>singleton</b>(&block)
|
1969
1982
|
</div>
|
1970
1983
|
<div class="description">
|
1971
1984
|
<p>
|
1972
|
-
Alias for <a href="Kernel.html#
|
1985
|
+
Alias for <a href="Kernel.html#M000393">singleton_class</a>
|
1973
1986
|
</p>
|
1974
1987
|
</div>
|
1975
1988
|
</div>
|
1976
1989
|
<div class="method">
|
1977
1990
|
<div class="title">
|
1978
|
-
<a name="
|
1991
|
+
<a name="M000393"></a><b>singleton_class</b>(&block)
|
1979
1992
|
</div>
|
1980
1993
|
<div class="description">
|
1981
1994
|
<p>
|
@@ -1987,11 +2000,11 @@ One day these names must be reconciled!
|
|
1987
2000
|
</div>
|
1988
2001
|
<div class="aka">
|
1989
2002
|
This method is also aliased as
|
1990
|
-
<a href="Kernel.html#
|
2003
|
+
<a href="Kernel.html#M000394">singleton</a>
|
1991
2004
|
</div>
|
1992
2005
|
<div class="sourcecode">
|
1993
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
1994
|
-
<div id="
|
2006
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000393_source')" id="l_M000393_source">+</a> ]</p>
|
2007
|
+
<div id="M000393_source" class="dyn-source">
|
1995
2008
|
<pre>
|
1996
2009
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/singleton_class.rb, line 7</span>
|
1997
2010
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">singleton_class</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
@@ -2007,7 +2020,7 @@ One day these names must be reconciled!
|
|
2007
2020
|
</div>
|
2008
2021
|
<div class="method">
|
2009
2022
|
<div class="title">
|
2010
|
-
<a name="
|
2023
|
+
<a name="M000360"></a><b>super_as</b>(klass=self.class.superclass, *args, &blk)
|
2011
2024
|
</div>
|
2012
2025
|
<div class="description">
|
2013
2026
|
<p>
|
@@ -2030,8 +2043,8 @@ Like super but skips to a specific ancestor module or class.
|
|
2030
2043
|
</pre>
|
2031
2044
|
</div>
|
2032
2045
|
<div class="sourcecode">
|
2033
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2034
|
-
<div id="
|
2046
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000360_source')" id="l_M000360_source">+</a> ]</p>
|
2047
|
+
<div id="M000360_source" class="dyn-source">
|
2035
2048
|
<pre>
|
2036
2049
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/as.rb, line 73</span>
|
2037
2050
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">super_as</span>(<span class="ruby-identifier">klass</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">superclass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
@@ -2047,7 +2060,7 @@ Like super but skips to a specific ancestor module or class.
|
|
2047
2060
|
</div>
|
2048
2061
|
<div class="method">
|
2049
2062
|
<div class="title">
|
2050
|
-
<a name="
|
2063
|
+
<a name="M000359"></a><b>super_method</b>(klass, meth)
|
2051
2064
|
</div>
|
2052
2065
|
<div class="description">
|
2053
2066
|
<p>
|
@@ -2055,8 +2068,8 @@ Returns method of a parent class bound to self.
|
|
2055
2068
|
</p>
|
2056
2069
|
</div>
|
2057
2070
|
<div class="sourcecode">
|
2058
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2059
|
-
<div id="
|
2071
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000359_source')" id="l_M000359_source">+</a> ]</p>
|
2072
|
+
<div id="M000359_source" class="dyn-source">
|
2060
2073
|
<pre>
|
2061
2074
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/as.rb, line 50</span>
|
2062
2075
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">super_method</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-identifier">meth</span>)
|
@@ -2071,17 +2084,17 @@ Returns method of a parent class bound to self.
|
|
2071
2084
|
</div>
|
2072
2085
|
<div class="method">
|
2073
2086
|
<div class="title">
|
2074
|
-
<a name="
|
2087
|
+
<a name="M000365"></a><b>tap</b>() {|self| ...}
|
2075
2088
|
</div>
|
2076
2089
|
<div class="description">
|
2077
2090
|
<p>
|
2078
|
-
The <a href="Kernel.html#
|
2091
|
+
The <a href="Kernel.html#M000365">tap</a> K-Combinator. This yields self
|
2079
2092
|
-and- returns self.
|
2080
2093
|
</p>
|
2081
2094
|
</div>
|
2082
2095
|
<div class="sourcecode">
|
2083
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2084
|
-
<div id="
|
2096
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000365_source')" id="l_M000365_source">+</a> ]</p>
|
2097
|
+
<div id="M000365_source" class="dyn-source">
|
2085
2098
|
<pre>
|
2086
2099
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/tap.rb, line 7</span>
|
2087
2100
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tap</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
@@ -2096,7 +2109,7 @@ The <a href="Kernel.html#M000359">tap</a> K-Combinator. This yields self
|
|
2096
2109
|
</div>
|
2097
2110
|
<div class="method">
|
2098
2111
|
<div class="title">
|
2099
|
-
<a name="
|
2112
|
+
<a name="M000352"></a><b>to_b</b>()
|
2100
2113
|
</div>
|
2101
2114
|
<div class="description">
|
2102
2115
|
<p>
|
@@ -2111,8 +2124,8 @@ this to suite the particular need.
|
|
2111
2124
|
</pre>
|
2112
2125
|
</div>
|
2113
2126
|
<div class="sourcecode">
|
2114
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2115
|
-
<div id="
|
2127
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000352_source')" id="l_M000352_source">+</a> ]</p>
|
2128
|
+
<div id="M000352_source" class="dyn-source">
|
2116
2129
|
<pre>
|
2117
2130
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 94</span>
|
2118
2131
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_b</span>
|
@@ -2124,7 +2137,7 @@ this to suite the particular need.
|
|
2124
2137
|
</div>
|
2125
2138
|
<div class="method">
|
2126
2139
|
<div class="title">
|
2127
|
-
<a name="
|
2140
|
+
<a name="M000353"></a><b>true?</b>()
|
2128
2141
|
</div>
|
2129
2142
|
<div class="description">
|
2130
2143
|
<p>
|
@@ -2138,8 +2151,8 @@ otherwise false.
|
|
2138
2151
|
</pre>
|
2139
2152
|
</div>
|
2140
2153
|
<div class="sourcecode">
|
2141
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2142
|
-
<div id="
|
2154
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000353_source')" id="l_M000353_source">+</a> ]</p>
|
2155
|
+
<div id="M000353_source" class="dyn-source">
|
2143
2156
|
<pre>
|
2144
2157
|
<span class="ruby-comment cmt"># File lib/core/facets/boolean.rb, line 105</span>
|
2145
2158
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">true?</span>
|
@@ -2151,7 +2164,7 @@ otherwise false.
|
|
2151
2164
|
</div>
|
2152
2165
|
<div class="method">
|
2153
2166
|
<div class="title">
|
2154
|
-
<a name="
|
2167
|
+
<a name="M000395"></a><b>try</b>(method, default=nil)
|
2155
2168
|
</div>
|
2156
2169
|
<div class="description">
|
2157
2170
|
<p>
|
@@ -2165,18 +2178,19 @@ vs
|
|
2165
2178
|
</p>
|
2166
2179
|
<pre>
|
2167
2180
|
@person.try(:name)
|
2168
|
-
|
2169
|
-
CREDIT: Chris Wanstrath
|
2170
2181
|
</pre>
|
2182
|
+
<p>
|
2183
|
+
CREDIT: Chris Wanstrath
|
2184
|
+
</p>
|
2171
2185
|
</div>
|
2172
2186
|
<div class="sourcecode">
|
2173
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2174
|
-
<div id="
|
2187
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000395_source')" id="l_M000395_source">+</a> ]</p>
|
2188
|
+
<div id="M000395_source" class="dyn-source">
|
2175
2189
|
<pre>
|
2176
|
-
<span class="ruby-comment cmt"># File lib/core/facets/kernel/try.rb, line
|
2190
|
+
<span class="ruby-comment cmt"># File lib/core/facets/kernel/try.rb, line 12</span>
|
2177
2191
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">try</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">default</span>=<span class="ruby-keyword kw">nil</span>)
|
2178
2192
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">method</span>
|
2179
|
-
<span class="ruby-identifier">send</span> <span class="ruby-identifier">method</span>
|
2193
|
+
<span class="ruby-identifier">send</span> <span class="ruby-identifier">method</span>
|
2180
2194
|
<span class="ruby-keyword kw">else</span>
|
2181
2195
|
<span class="ruby-identifier">default</span>
|
2182
2196
|
<span class="ruby-keyword kw">end</span>
|
@@ -2187,7 +2201,7 @@ vs
|
|
2187
2201
|
</div>
|
2188
2202
|
<div class="method">
|
2189
2203
|
<div class="title">
|
2190
|
-
<a name="
|
2204
|
+
<a name="M000401"></a><b>val?</b>()
|
2191
2205
|
</div>
|
2192
2206
|
<div class="description">
|
2193
2207
|
<p>
|
@@ -2202,8 +2216,8 @@ if it is not nil? and if it responds to empty?, is not empty.
|
|
2202
2216
|
</pre>
|
2203
2217
|
</div>
|
2204
2218
|
<div class="sourcecode">
|
2205
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2206
|
-
<div id="
|
2219
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000401_source')" id="l_M000401_source">+</a> ]</p>
|
2220
|
+
<div id="M000401_source" class="dyn-source">
|
2207
2221
|
<pre>
|
2208
2222
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/val.rb, line 12</span>
|
2209
2223
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">val?</span>
|
@@ -2217,11 +2231,11 @@ if it is not nil? and if it responds to empty?, is not empty.
|
|
2217
2231
|
</div>
|
2218
2232
|
<div class="method">
|
2219
2233
|
<div class="title">
|
2220
|
-
<a name="
|
2234
|
+
<a name="M000385"></a><b>with</b>(obj=self, &block)
|
2221
2235
|
</div>
|
2222
2236
|
<div class="description">
|
2223
2237
|
<p>
|
2224
|
-
Like <a href="Kernel.html#
|
2238
|
+
Like <a href="Kernel.html#M000397">returning</a> but exectures the block
|
2225
2239
|
via instance_eval.
|
2226
2240
|
</p>
|
2227
2241
|
<pre>
|
@@ -2236,8 +2250,8 @@ via instance_eval.
|
|
2236
2250
|
</pre>
|
2237
2251
|
</div>
|
2238
2252
|
<div class="sourcecode">
|
2239
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
2240
|
-
<div id="
|
2253
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000385_source')" id="l_M000385_source">+</a> ]</p>
|
2254
|
+
<div id="M000385_source" class="dyn-source">
|
2241
2255
|
<pre>
|
2242
2256
|
<span class="ruby-comment cmt"># File lib/core/facets/kernel/with.rb, line 15</span>
|
2243
2257
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>(<span class="ruby-identifier">obj</span>=<span class="ruby-keyword kw">self</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|