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
@@ -79,25 +79,25 @@ Object
|
|
79
79
|
<p>
|
80
80
|
Tool module for downloading files and extracting archive files. Currently
|
81
81
|
this is console-based but in the future will have SOC for any <a
|
82
|
-
href="Downloader.html#
|
82
|
+
href="Downloader.html#M000095">interface</a>.
|
83
83
|
</p>
|
84
84
|
</div>
|
85
85
|
|
86
86
|
|
87
87
|
|
88
88
|
<div class="sectiontitle">Methods</div>
|
89
|
-
<span style="padding-right: 5px;"><a href="#
|
90
|
-
<span style="padding-right: 5px;"><a href="#
|
91
|
-
<span style="padding-right: 5px;"><a href="#
|
92
|
-
<span style="padding-right: 5px;"><a href="#
|
93
|
-
<span style="padding-right: 5px;"><a href="#
|
94
|
-
<span style="padding-right: 5px;"><a href="#
|
95
|
-
<span style="padding-right: 5px;"><a href="#
|
96
|
-
<span style="padding-right: 5px;"><a href="#
|
97
|
-
<span style="padding-right: 5px;"><a href="#
|
98
|
-
<span style="padding-right: 5px;"><a href="#
|
99
|
-
<span style="padding-right: 5px;"><a href="#
|
100
|
-
<span style="padding-right: 5px;"><a href="#
|
89
|
+
<span style="padding-right: 5px;"><a href="#M000098">add_mirror</a></span>
|
90
|
+
<span style="padding-right: 5px;"><a href="#M000099">add_mirrors</a></span>
|
91
|
+
<span style="padding-right: 5px;"><a href="#M000105">compute_checksum</a></span>
|
92
|
+
<span style="padding-right: 5px;"><a href="#M000104">download</a></span>
|
93
|
+
<span style="padding-right: 5px;"><a href="#M000106">extract</a></span>
|
94
|
+
<span style="padding-right: 5px;"><a href="#M000101">fetch</a></span>
|
95
|
+
<span style="padding-right: 5px;"><a href="#M000095">interface</a></span>
|
96
|
+
<span style="padding-right: 5px;"><a href="#M000096">interface=</a></span>
|
97
|
+
<span style="padding-right: 5px;"><a href="#M000100">mirrors</a></span>
|
98
|
+
<span style="padding-right: 5px;"><a href="#M000102">monitored_download</a></span>
|
99
|
+
<span style="padding-right: 5px;"><a href="#M000097">new</a></span>
|
100
|
+
<span style="padding-right: 5px;"><a href="#M000103">prioritize_urls</a></span>
|
101
101
|
|
102
102
|
|
103
103
|
|
@@ -124,11 +124,11 @@ href="Downloader.html#M000091">interface</a>.
|
|
124
124
|
<div class="sectiontitle">Public Class methods</div>
|
125
125
|
<div class="method">
|
126
126
|
<div class="title">
|
127
|
-
<a name="
|
127
|
+
<a name="M000097"></a><b>new</b>( destination, mirrors=nil, region=nil, &config )
|
128
128
|
</div>
|
129
129
|
<div class="sourcecode">
|
130
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
131
|
-
<div id="
|
130
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">+</a> ]</p>
|
131
|
+
<div id="M000097_source" class="dyn-source">
|
132
132
|
<pre>
|
133
133
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 66</span>
|
134
134
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>( <span class="ruby-identifier">destination</span>, <span class="ruby-identifier">mirrors</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">region</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">config</span> )
|
@@ -145,11 +145,11 @@ href="Downloader.html#M000091">interface</a>.
|
|
145
145
|
<div class="sectiontitle">Public Instance methods</div>
|
146
146
|
<div class="method">
|
147
147
|
<div class="title">
|
148
|
-
<a name="
|
148
|
+
<a name="M000098"></a><b>add_mirror</b>( url, region=nil )
|
149
149
|
</div>
|
150
150
|
<div class="sourcecode">
|
151
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
152
|
-
<div id="
|
151
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">+</a> ]</p>
|
152
|
+
<div id="M000098_source" class="dyn-source">
|
153
153
|
<pre>
|
154
154
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 76</span>
|
155
155
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_mirror</span>( <span class="ruby-identifier">url</span>, <span class="ruby-identifier">region</span>=<span class="ruby-keyword kw">nil</span> )
|
@@ -161,11 +161,11 @@ href="Downloader.html#M000091">interface</a>.
|
|
161
161
|
</div>
|
162
162
|
<div class="method">
|
163
163
|
<div class="title">
|
164
|
-
<a name="
|
164
|
+
<a name="M000099"></a><b>add_mirrors</b>( mirrors )
|
165
165
|
</div>
|
166
166
|
<div class="sourcecode">
|
167
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
168
|
-
<div id="
|
167
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000099_source')" id="l_M000099_source">+</a> ]</p>
|
168
|
+
<div id="M000099_source" class="dyn-source">
|
169
169
|
<pre>
|
170
170
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 80</span>
|
171
171
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_mirrors</span>( <span class="ruby-identifier">mirrors</span> )
|
@@ -191,16 +191,16 @@ href="Downloader.html#M000091">interface</a>.
|
|
191
191
|
</div>
|
192
192
|
<div class="method">
|
193
193
|
<div class="title">
|
194
|
-
<a name="
|
194
|
+
<a name="M000105"></a><b>compute_checksum</b>( local_path )
|
195
195
|
</div>
|
196
196
|
<div class="description">
|
197
197
|
<p>
|
198
|
-
<a href="Downloader.html#
|
198
|
+
<a href="Downloader.html#M000105">compute_checksum</a>
|
199
199
|
</p>
|
200
200
|
</div>
|
201
201
|
<div class="sourcecode">
|
202
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
203
|
-
<div id="
|
202
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000105_source')" id="l_M000105_source">+</a> ]</p>
|
203
|
+
<div id="M000105_source" class="dyn-source">
|
204
204
|
<pre>
|
205
205
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 240</span>
|
206
206
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compute_checksum</span>( <span class="ruby-identifier">local_path</span> )
|
@@ -216,11 +216,11 @@ href="Downloader.html#M000091">interface</a>.
|
|
216
216
|
</div>
|
217
217
|
<div class="method">
|
218
218
|
<div class="title">
|
219
|
-
<a name="
|
219
|
+
<a name="M000104"></a><b>download</b>( url, filepath, checksum='', est_size=nil )
|
220
220
|
</div>
|
221
221
|
<div class="description">
|
222
222
|
<p>
|
223
|
-
currently can only <a href="Downloader.html#
|
223
|
+
currently can only <a href="Downloader.html#M000104">download</a> a single
|
224
224
|
compressed file does not handle downloading an uncompressed directory tree
|
225
225
|
(should it? doubt it)
|
226
226
|
</p>
|
@@ -232,8 +232,8 @@ chain messaging but matz said no :(
|
|
232
232
|
</p>
|
233
233
|
</div>
|
234
234
|
<div class="sourcecode">
|
235
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
236
|
-
<div id="
|
235
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000104_source')" id="l_M000104_source">+</a> ]</p>
|
236
|
+
<div id="M000104_source" class="dyn-source">
|
237
237
|
<pre>
|
238
238
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 179</span>
|
239
239
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">download</span>( <span class="ruby-identifier">url</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">checksum</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">est_size</span>=<span class="ruby-keyword kw">nil</span> )
|
@@ -300,16 +300,16 @@ chain messaging but matz said no :(
|
|
300
300
|
</div>
|
301
301
|
<div class="method">
|
302
302
|
<div class="title">
|
303
|
-
<a name="
|
303
|
+
<a name="M000106"></a><b>extract</b>( local_path )
|
304
304
|
</div>
|
305
305
|
<div class="description">
|
306
306
|
<p>
|
307
|
-
<a href="Downloader.html#
|
307
|
+
<a href="Downloader.html#M000106">extract</a>
|
308
308
|
</p>
|
309
309
|
</div>
|
310
310
|
<div class="sourcecode">
|
311
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
312
|
-
<div id="
|
311
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000106_source')" id="l_M000106_source">+</a> ]</p>
|
312
|
+
<div id="M000106_source" class="dyn-source">
|
313
313
|
<pre>
|
314
314
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 250</span>
|
315
315
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract</span>( <span class="ruby-identifier">local_path</span> )
|
@@ -347,16 +347,16 @@ chain messaging but matz said no :(
|
|
347
347
|
</div>
|
348
348
|
<div class="method">
|
349
349
|
<div class="title">
|
350
|
-
<a name="
|
350
|
+
<a name="M000101"></a><b>fetch</b>( file, checksum=0, est_size=0, force=false )
|
351
351
|
</div>
|
352
352
|
<div class="description">
|
353
353
|
<p>
|
354
|
-
<a href="Downloader.html#
|
354
|
+
<a href="Downloader.html#M000101">fetch</a>
|
355
355
|
</p>
|
356
356
|
</div>
|
357
357
|
<div class="sourcecode">
|
358
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
359
|
-
<div id="
|
358
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">+</a> ]</p>
|
359
|
+
<div id="M000101_source" class="dyn-source">
|
360
360
|
<pre>
|
361
361
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 104</span>
|
362
362
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>( <span class="ruby-identifier">file</span>, <span class="ruby-identifier">checksum</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">est_size</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">force</span>=<span class="ruby-keyword kw">false</span> )
|
@@ -371,17 +371,17 @@ chain messaging but matz said no :(
|
|
371
371
|
</div>
|
372
372
|
<div class="method">
|
373
373
|
<div class="title">
|
374
|
-
<a name="
|
374
|
+
<a name="M000095"></a><b>interface</b>()
|
375
375
|
</div>
|
376
376
|
<div class="description">
|
377
377
|
<p>
|
378
|
-
delegate to an <a href="Downloader.html#
|
378
|
+
delegate to an <a href="Downloader.html#M000095">interface</a> (under
|
379
379
|
development)
|
380
380
|
</p>
|
381
381
|
</div>
|
382
382
|
<div class="sourcecode">
|
383
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
384
|
-
<div id="
|
383
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">+</a> ]</p>
|
384
|
+
<div id="M000095_source" class="dyn-source">
|
385
385
|
<pre>
|
386
386
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 61</span>
|
387
387
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">interface</span> ; <span class="ruby-ivar">@interface</span>; <span class="ruby-keyword kw">end</span>
|
@@ -391,11 +391,11 @@ development)
|
|
391
391
|
</div>
|
392
392
|
<div class="method">
|
393
393
|
<div class="title">
|
394
|
-
<a name="
|
394
|
+
<a name="M000096"></a><b>interface=</b>(iface)
|
395
395
|
</div>
|
396
396
|
<div class="sourcecode">
|
397
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
398
|
-
<div id="
|
397
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">+</a> ]</p>
|
398
|
+
<div id="M000096_source" class="dyn-source">
|
399
399
|
<pre>
|
400
400
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 62</span>
|
401
401
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">interface=</span>(<span class="ruby-identifier">iface</span>)
|
@@ -407,11 +407,11 @@ development)
|
|
407
407
|
</div>
|
408
408
|
<div class="method">
|
409
409
|
<div class="title">
|
410
|
-
<a name="
|
410
|
+
<a name="M000100"></a><b>mirrors</b>()
|
411
411
|
</div>
|
412
412
|
<div class="sourcecode">
|
413
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
414
|
-
<div id="
|
413
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">+</a> ]</p>
|
414
|
+
<div id="M000100_source" class="dyn-source">
|
415
415
|
<pre>
|
416
416
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 98</span>
|
417
417
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mirrors</span>
|
@@ -423,20 +423,20 @@ development)
|
|
423
423
|
</div>
|
424
424
|
<div class="method">
|
425
425
|
<div class="title">
|
426
|
-
<a name="
|
426
|
+
<a name="M000102"></a><b>monitored_download</b>( urls, filepath, checksum, est_size=0, force=false )
|
427
427
|
</div>
|
428
428
|
<div class="description">
|
429
429
|
<p>
|
430
430
|
regional_urls - array of arrays of [ url, region, md5, expected_size ]
|
431
431
|
local_region - region of the user‘s system to_dir - where to store
|
432
432
|
downloaded file (full path) force - <a
|
433
|
-
href="Downloader.html#
|
433
|
+
href="Downloader.html#M000104">download</a> even if file already exists
|
434
434
|
locally
|
435
435
|
</p>
|
436
436
|
</div>
|
437
437
|
<div class="sourcecode">
|
438
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
439
|
-
<div id="
|
438
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">+</a> ]</p>
|
439
|
+
<div id="M000102_source" class="dyn-source">
|
440
440
|
<pre>
|
441
441
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 125</span>
|
442
442
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">monitored_download</span>( <span class="ruby-identifier">urls</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">checksum</span>, <span class="ruby-identifier">est_size</span>=<span class="ruby-value">0</span>, <span class="ruby-identifier">force</span>=<span class="ruby-keyword kw">false</span> )
|
@@ -480,17 +480,17 @@ locally
|
|
480
480
|
</div>
|
481
481
|
<div class="method">
|
482
482
|
<div class="title">
|
483
|
-
<a name="
|
483
|
+
<a name="M000103"></a><b>prioritize_urls</b>( urls )
|
484
484
|
</div>
|
485
485
|
<div class="description">
|
486
486
|
<p>
|
487
487
|
In the future we may test each connection for fastest <a
|
488
|
-
href="Downloader.html#
|
488
|
+
href="Downloader.html#M000104">download</a>
|
489
489
|
</p>
|
490
490
|
</div>
|
491
491
|
<div class="sourcecode">
|
492
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
493
|
-
<div id="
|
492
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">+</a> ]</p>
|
493
|
+
<div id="M000103_source" class="dyn-source">
|
494
494
|
<pre>
|
495
495
|
<span class="ruby-comment cmt"># File lib/more/facets/downloader.rb, line 163</span>
|
496
496
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prioritize_urls</span>( <span class="ruby-identifier">urls</span> )
|
@@ -75,172 +75,119 @@ Object
|
|
75
75
|
<div id="bodyContent">
|
76
76
|
<div id="content">
|
77
77
|
|
78
|
-
<div class="description"><h1><a href="Duration.html">Duration</a></h1>
|
79
|
-
<p>
|
80
|
-
<a href="Duration.html">Duration</a> is a simple class that provides ways
|
81
|
-
of easily manipulating durations (timespans) and formatting them as well.
|
82
|
-
</p>
|
83
|
-
<pre>
|
84
|
-
require 'duration'
|
85
|
-
=> true
|
86
|
-
d = Duration.new(60 * 60 * 24 * 10 + 120 + 30)
|
87
|
-
=> #<Duration: 1 week, 3 days, 2 minutes and 30 seconds>
|
88
|
-
d.to_s
|
89
|
-
=> "1 week, 3 days, 2 minutes and 30 seconds"
|
90
|
-
[d.weeks, d.days]
|
91
|
-
=> [1, 3]
|
92
|
-
d.days = 7; d
|
93
|
-
=> #<Duration: 2 weeks, 2 minutes and 30 seconds>
|
94
|
-
d.strftime('%w w, %d d, %h h, %m m, %s s')
|
95
|
-
=> "2 w, 0 d, 0 h, 2 m, 30 s"
|
96
|
-
</pre>
|
97
|
-
</div>
|
98
78
|
|
99
79
|
|
100
80
|
|
101
81
|
<div class="sectiontitle">Methods</div>
|
102
|
-
<span style="padding-right: 5px;"><a href="#
|
103
|
-
<span style="padding-right: 5px;"><a href="#
|
104
|
-
<span style="padding-right: 5px;"><a href="#
|
105
|
-
<span style="padding-right: 5px;"><a href="#
|
106
|
-
<span style="padding-right: 5px;"><a href="#
|
107
|
-
<span style="padding-right: 5px;"><a href="#
|
108
|
-
<span style="padding-right: 5px;"><a href="#
|
109
|
-
<span style="padding-right: 5px;"><a href="#
|
110
|
-
<span style="padding-right: 5px;"><a href="#
|
111
|
-
<span style="padding-right: 5px;"><a href="#
|
112
|
-
<span style="padding-right: 5px;"><a href="#
|
113
|
-
<span style="padding-right: 5px;"><a href="#
|
114
|
-
<span style="padding-right: 5px;"><a href="#
|
115
|
-
<span style="padding-right: 5px;"><a href="#
|
116
|
-
<span style="padding-right: 5px;"><a href="#
|
117
|
-
<span style="padding-right: 5px;"><a href="#M000463">
|
82
|
+
<span style="padding-right: 5px;"><a href="#M000465">+</a></span>
|
83
|
+
<span style="padding-right: 5px;"><a href="#M000467">+</a></span>
|
84
|
+
<span style="padding-right: 5px;"><a href="#M000466">-</a></span>
|
85
|
+
<span style="padding-right: 5px;"><a href="#M000468">/</a></span>
|
86
|
+
<span style="padding-right: 5px;"><a href="#M000457"><=></a></span>
|
87
|
+
<span style="padding-right: 5px;"><a href="#M000456">==</a></span>
|
88
|
+
<span style="padding-right: 5px;"><a href="#M000446">[]</a></span>
|
89
|
+
<span style="padding-right: 5px;"><a href="#M000472">after</a></span>
|
90
|
+
<span style="padding-right: 5px;"><a href="#M000471">before</a></span>
|
91
|
+
<span style="padding-right: 5px;"><a href="#M000460">days</a></span>
|
92
|
+
<span style="padding-right: 5px;"><a href="#M000461">hours</a></span>
|
93
|
+
<span style="padding-right: 5px;"><a href="#M000450">inspect</a></span>
|
94
|
+
<span style="padding-right: 5px;"><a href="#M000462">minutes</a></span>
|
95
|
+
<span style="padding-right: 5px;"><a href="#M000447">new</a></span>
|
96
|
+
<span style="padding-right: 5px;"><a href="#M000449">reset_segments</a></span>
|
97
|
+
<span style="padding-right: 5px;"><a href="#M000463">seconds</a></span>
|
98
|
+
<span style="padding-right: 5px;"><a href="#M000469">segmented</a></span>
|
99
|
+
<span style="padding-right: 5px;"><a href="#M000448">segments</a></span>
|
100
|
+
<span style="padding-right: 5px;"><a href="#M000470">strftime</a></span>
|
101
|
+
<span style="padding-right: 5px;"><a href="#M000453">to_a</a></span>
|
102
|
+
<span style="padding-right: 5px;"><a href="#M000452">to_f</a></span>
|
103
|
+
<span style="padding-right: 5px;"><a href="#M000454">to_h</a></span>
|
104
|
+
<span style="padding-right: 5px;"><a href="#M000451">to_i</a></span>
|
105
|
+
<span style="padding-right: 5px;"><a href="#M000455">to_s</a></span>
|
106
|
+
<span style="padding-right: 5px;"><a href="#M000464">total</a></span>
|
107
|
+
<span style="padding-right: 5px;"><a href="#M000459">weeks</a></span>
|
108
|
+
<span style="padding-right: 5px;"><a href="#M000458">years</a></span>
|
118
109
|
|
119
110
|
<div class="sectiontitle">Included Modules</div>
|
120
111
|
<ul>
|
121
112
|
<li>Comparable</li>
|
122
|
-
<li><a href="Enumerable.html">Enumerable</a></li>
|
123
113
|
</ul>
|
124
114
|
|
125
115
|
|
116
|
+
<div class="sectiontitle">Classes and Modules</div>
|
117
|
+
Module <a href="Duration/Numeric.html" class="link">Duration::Numeric</a><br />
|
118
|
+
Module <a href="Duration/Time.html" class="link">Duration::Time</a><br />
|
119
|
+
|
126
120
|
|
127
121
|
<div class="sectiontitle">Constants</div>
|
128
122
|
<table border='0' cellpadding='5'>
|
129
123
|
<tr valign='top'>
|
130
|
-
<td class="attr-name">
|
124
|
+
<td class="attr-name">SECOND</td>
|
131
125
|
<td>=</td>
|
132
|
-
<td class="attr-value">
|
126
|
+
<td class="attr-value">1</td>
|
133
127
|
</tr>
|
134
128
|
<tr valign='top'>
|
135
|
-
<td class="attr-name">
|
129
|
+
<td class="attr-name">MINUTE</td>
|
136
130
|
<td>=</td>
|
137
|
-
<td class="attr-value">60 *
|
131
|
+
<td class="attr-value">60 * SECOND</td>
|
138
132
|
</tr>
|
139
133
|
<tr valign='top'>
|
140
134
|
<td class="attr-name">HOUR</td>
|
141
135
|
<td>=</td>
|
142
|
-
<td class="attr-value">60 *
|
136
|
+
<td class="attr-value">60 * MINUTE</td>
|
143
137
|
</tr>
|
144
138
|
<tr valign='top'>
|
145
|
-
<td class="attr-name">
|
139
|
+
<td class="attr-name">DAY</td>
|
146
140
|
<td>=</td>
|
147
|
-
<td class="attr-value">
|
141
|
+
<td class="attr-value">24 * HOUR</td>
|
148
142
|
</tr>
|
149
143
|
<tr valign='top'>
|
150
|
-
<td class="attr-name">
|
144
|
+
<td class="attr-name">WEEK</td>
|
151
145
|
<td>=</td>
|
152
|
-
<td class="attr-value">
|
146
|
+
<td class="attr-value">7 * DAY</td>
|
153
147
|
</tr>
|
154
|
-
</table>
|
155
|
-
|
156
|
-
<div class="sectiontitle">Attributes</div>
|
157
|
-
<table border='0' cellpadding='5'>
|
158
148
|
<tr valign='top'>
|
159
|
-
<td class=
|
160
|
-
|
161
|
-
</td>
|
162
|
-
<td class='attr-name'>days</td>
|
163
|
-
<td class='attr-desc'></td>
|
164
|
-
</tr>
|
165
|
-
<tr valign='top'>
|
166
|
-
<td class='attr-rw'>
|
167
|
-
[R]
|
168
|
-
</td>
|
169
|
-
<td class='attr-name'>hours</td>
|
170
|
-
<td class='attr-desc'></td>
|
171
|
-
</tr>
|
172
|
-
<tr valign='top'>
|
173
|
-
<td class='attr-rw'>
|
174
|
-
[R]
|
175
|
-
</td>
|
176
|
-
<td class='attr-name'>minutes</td>
|
177
|
-
<td class='attr-desc'></td>
|
178
|
-
</tr>
|
179
|
-
<tr valign='top'>
|
180
|
-
<td class='attr-rw'>
|
181
|
-
[R]
|
182
|
-
</td>
|
183
|
-
<td class='attr-name'>total</td>
|
184
|
-
<td class='attr-desc'></td>
|
149
|
+
<td class="attr-name">YEAR</td>
|
150
|
+
<td>=</td>
|
151
|
+
<td class="attr-value">365 * DAY</td>
|
185
152
|
</tr>
|
186
153
|
<tr valign='top'>
|
187
|
-
<td class=
|
188
|
-
|
189
|
-
</td>
|
190
|
-
<td class='attr-name'>weeks</td>
|
191
|
-
<td class='attr-desc'></td>
|
154
|
+
<td class="attr-name">SEGMENTS</td>
|
155
|
+
<td>=</td>
|
156
|
+
<td class="attr-value">%w{years weeks days hours minutes seconds}.collect{ |s| s.to_sym }</td>
|
192
157
|
</tr>
|
193
158
|
</table>
|
194
159
|
|
160
|
+
|
195
161
|
<div class="sectiontitle">Public Class methods</div>
|
196
162
|
<div class="method">
|
197
163
|
<div class="title">
|
198
|
-
<a name="
|
164
|
+
<a name="M000446"></a><b>[]</b>(seconds, *segments)
|
199
165
|
</div>
|
200
|
-
|
201
|
-
<p>
|
202
|
-
|
203
|
-
</p>
|
204
|
-
<p>
|
205
|
-
<b>Example</b>
|
206
|
-
</p>
|
166
|
+
<div class="sourcecode">
|
167
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000446_source')" id="l_M000446_source">+</a> ]</p>
|
168
|
+
<div id="M000446_source" class="dyn-source">
|
207
169
|
<pre>
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
170
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 14</span>
|
171
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-identifier">seconds</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
172
|
+
<span class="ruby-identifier">new</span>(<span class="ruby-identifier">seconds</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
173
|
+
<span class="ruby-keyword kw">end</span>
|
212
174
|
</pre>
|
213
175
|
</div>
|
176
|
+
</div>
|
177
|
+
</div>
|
178
|
+
<div class="method">
|
179
|
+
<div class="title">
|
180
|
+
<a name="M000447"></a><b>new</b>(seconds=0, *segments)
|
181
|
+
</div>
|
214
182
|
<div class="sourcecode">
|
215
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
216
|
-
<div id="
|
183
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000447_source')" id="l_M000447_source">+</a> ]</p>
|
184
|
+
<div id="M000447_source" class="dyn-source">
|
217
185
|
<pre>
|
218
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
<span class="ruby-comment cmt"># Loop through each valid part, ignore all others.</span>
|
225
|
-
<span class="ruby-identifier">seconds</span> = <span class="ruby-identifier">seconds_or_attr</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sec</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
226
|
-
<span class="ruby-comment cmt"># Grab the part of the duration (week, day, whatever) and the number of seconds for it.</span>
|
227
|
-
<span class="ruby-identifier">part</span>, <span class="ruby-identifier">time</span> = <span class="ruby-identifier">args</span>
|
228
|
-
|
229
|
-
<span class="ruby-comment cmt"># Map each part to their number of seconds and the given value.</span>
|
230
|
-
<span class="ruby-comment cmt"># {:weeks => 2} maps to h[:weeks] -- so... weeks = WEEK * 2</span>
|
231
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">prt</span> = <span class="ruby-identifier">part</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_sym</span>) <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">sec</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">time</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">prt</span>] <span class="ruby-keyword kw">else</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">end</span>
|
232
|
-
<span class="ruby-keyword kw">end</span>
|
233
|
-
<span class="ruby-keyword kw">else</span>
|
234
|
-
<span class="ruby-identifier">seconds</span> = <span class="ruby-identifier">seconds_or_attr</span>
|
235
|
-
<span class="ruby-keyword kw">end</span>
|
236
|
-
|
237
|
-
<span class="ruby-ivar">@total</span>, <span class="ruby-identifier">array</span> = <span class="ruby-identifier">seconds</span>.<span class="ruby-identifier">to_f</span>.<span class="ruby-identifier">round</span>, []
|
238
|
-
<span class="ruby-ivar">@seconds</span> = [<span class="ruby-constant">WEEK</span>, <span class="ruby-constant">DAY</span>, <span class="ruby-constant">HOUR</span>, <span class="ruby-constant">MINUTE</span>].<span class="ruby-identifier">inject</span>(<span class="ruby-ivar">@total</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">left</span>, <span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
|
239
|
-
<span class="ruby-identifier">array</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">left</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">part</span>; <span class="ruby-identifier">left</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">part</span>
|
240
|
-
<span class="ruby-keyword kw">end</span>
|
241
|
-
|
242
|
-
<span class="ruby-ivar">@weeks</span>, <span class="ruby-ivar">@days</span>, <span class="ruby-ivar">@hours</span>, <span class="ruby-ivar">@minutes</span> = <span class="ruby-identifier">array</span>
|
243
|
-
<span class="ruby-keyword kw">end</span>
|
186
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 19</span>
|
187
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">seconds</span>=<span class="ruby-value">0</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
188
|
+
<span class="ruby-ivar">@seconds</span> = <span class="ruby-identifier">seconds</span>.<span class="ruby-identifier">to_i</span>
|
189
|
+
<span class="ruby-identifier">reset_segments</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
190
|
+
<span class="ruby-keyword kw">end</span>
|
244
191
|
</pre>
|
245
192
|
</div>
|
246
193
|
</div>
|
@@ -248,396 +195,295 @@ Initialize <a href="Duration.html">Duration</a> class.
|
|
248
195
|
<div class="sectiontitle">Public Instance methods</div>
|
249
196
|
<div class="method">
|
250
197
|
<div class="title">
|
251
|
-
<a name="
|
252
|
-
</div>
|
253
|
-
<div class="description">
|
254
|
-
<p>
|
255
|
-
Multiply two Durations.
|
256
|
-
</p>
|
257
|
-
<p>
|
258
|
-
<b>Example</b>
|
259
|
-
</p>
|
260
|
-
<pre>
|
261
|
-
d = Duration.new(30)
|
262
|
-
=> #<Duration: 30 seconds>
|
263
|
-
d * 2
|
264
|
-
=> #<Duration: 1 minute>
|
265
|
-
</pre>
|
198
|
+
<a name="M000465"></a><b>+</b>(other)
|
266
199
|
</div>
|
267
200
|
<div class="sourcecode">
|
268
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
269
|
-
<div id="
|
201
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000465_source')" id="l_M000465_source">+</a> ]</p>
|
202
|
+
<div id="M000465_source" class="dyn-source">
|
270
203
|
<pre>
|
271
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
272
|
-
|
273
|
-
|
274
|
-
|
204
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 123</span>
|
205
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">other</span>)
|
206
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@seconds</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">segments</span>)
|
207
|
+
<span class="ruby-keyword kw">end</span>
|
275
208
|
</pre>
|
276
209
|
</div>
|
277
210
|
</div>
|
278
211
|
</div>
|
279
212
|
<div class="method">
|
280
213
|
<div class="title">
|
281
|
-
<a name="
|
282
|
-
</div>
|
283
|
-
<div class="description">
|
284
|
-
<p>
|
285
|
-
Add to <a href="Duration.html">Duration</a>.
|
286
|
-
</p>
|
287
|
-
<p>
|
288
|
-
<b>Example</b>
|
289
|
-
</p>
|
290
|
-
<pre>
|
291
|
-
d = Duration.new(30)
|
292
|
-
=> #<Duration: 30 seconds>
|
293
|
-
d + 30
|
294
|
-
=> #<Duration: 1 minute>
|
295
|
-
</pre>
|
214
|
+
<a name="M000467"></a><b>+</b>(other)
|
296
215
|
</div>
|
297
216
|
<div class="sourcecode">
|
298
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
299
|
-
<div id="
|
217
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000467_source')" id="l_M000467_source">+</a> ]</p>
|
218
|
+
<div id="M000467_source" class="dyn-source">
|
300
219
|
<pre>
|
301
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
302
|
-
|
303
|
-
|
304
|
-
|
220
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 131</span>
|
221
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">+</span>(<span class="ruby-identifier">other</span>)
|
222
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@seconds</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">segments</span>)
|
223
|
+
<span class="ruby-keyword kw">end</span>
|
305
224
|
</pre>
|
306
225
|
</div>
|
307
226
|
</div>
|
308
227
|
</div>
|
309
228
|
<div class="method">
|
310
229
|
<div class="title">
|
311
|
-
<a name="
|
312
|
-
</div>
|
313
|
-
<div class="description">
|
314
|
-
<p>
|
315
|
-
Subtract from <a href="Duration.html">Duration</a>.
|
316
|
-
</p>
|
317
|
-
<p>
|
318
|
-
<b>Example</b>
|
319
|
-
</p>
|
320
|
-
<pre>
|
321
|
-
d = Duration.new(30)
|
322
|
-
=> #<Duration: 30 seconds>
|
323
|
-
d - 15
|
324
|
-
=> #<Duration: 15 seconds>
|
325
|
-
</pre>
|
230
|
+
<a name="M000466"></a><b>-</b>(other)
|
326
231
|
</div>
|
327
232
|
<div class="sourcecode">
|
328
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
329
|
-
<div id="
|
233
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000466_source')" id="l_M000466_source">+</a> ]</p>
|
234
|
+
<div id="M000466_source" class="dyn-source">
|
330
235
|
<pre>
|
331
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
332
|
-
|
333
|
-
|
334
|
-
|
236
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 127</span>
|
237
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">other</span>)
|
238
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@seconds</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">segments</span>)
|
239
|
+
<span class="ruby-keyword kw">end</span>
|
335
240
|
</pre>
|
336
241
|
</div>
|
337
242
|
</div>
|
338
243
|
</div>
|
339
244
|
<div class="method">
|
340
245
|
<div class="title">
|
341
|
-
<a name="
|
246
|
+
<a name="M000468"></a><b>/</b>(other)
|
342
247
|
</div>
|
343
|
-
|
344
|
-
<p>
|
345
|
-
|
346
|
-
</p>
|
347
|
-
<p>
|
348
|
-
<b>Example</b>
|
349
|
-
</p>
|
248
|
+
<div class="sourcecode">
|
249
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000468_source')" id="l_M000468_source">+</a> ]</p>
|
250
|
+
<div id="M000468_source" class="dyn-source">
|
350
251
|
<pre>
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
252
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 135</span>
|
253
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">/</span>(<span class="ruby-identifier">other</span>)
|
254
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@seconds</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">segments</span>)
|
255
|
+
<span class="ruby-keyword kw">end</span>
|
355
256
|
</pre>
|
356
257
|
</div>
|
258
|
+
</div>
|
259
|
+
</div>
|
260
|
+
<div class="method">
|
261
|
+
<div class="title">
|
262
|
+
<a name="M000457"></a><b><=></b>(other)
|
263
|
+
</div>
|
357
264
|
<div class="sourcecode">
|
358
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
359
|
-
<div id="
|
265
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000457_source')" id="l_M000457_source">+</a> ]</p>
|
266
|
+
<div id="M000457_source" class="dyn-source">
|
360
267
|
<pre>
|
361
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
362
|
-
|
363
|
-
|
364
|
-
|
268
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 102</span>
|
269
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">other</span>)
|
270
|
+
<span class="ruby-ivar">@seconds</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">to_i</span>
|
271
|
+
<span class="ruby-keyword kw">end</span>
|
365
272
|
</pre>
|
366
273
|
</div>
|
367
274
|
</div>
|
368
275
|
</div>
|
369
276
|
<div class="method">
|
370
277
|
<div class="title">
|
371
|
-
<a name="
|
278
|
+
<a name="M000456"></a><b>==</b>(other)
|
372
279
|
</div>
|
373
280
|
<div class="description">
|
374
281
|
<p>
|
375
|
-
|
282
|
+
Returns true if <tt>other</tt> is also a <a
|
283
|
+
href="Duration.html">Duration</a> instance with the same <tt>value</tt>, or
|
284
|
+
if <tt>other == value</tt>.
|
376
285
|
</p>
|
377
|
-
<p>
|
378
|
-
<b>Example</b>
|
379
|
-
</p>
|
380
|
-
<pre>
|
381
|
-
5.days == 24.hours * 5
|
382
|
-
=> true
|
383
|
-
</pre>
|
384
286
|
</div>
|
385
287
|
<div class="sourcecode">
|
386
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
387
|
-
<div id="
|
388
|
-
<pre>
|
389
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
390
|
-
|
391
|
-
|
288
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000456_source')" id="l_M000456_source">+</a> ]</p>
|
289
|
+
<div id="M000456_source" class="dyn-source">
|
290
|
+
<pre>
|
291
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 94</span>
|
292
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
293
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Duration</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">other</span>
|
294
|
+
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">seconds</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">seconds</span>
|
295
|
+
<span class="ruby-keyword kw">else</span>
|
296
|
+
<span class="ruby-identifier">other</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">seconds</span>
|
392
297
|
<span class="ruby-keyword kw">end</span>
|
298
|
+
<span class="ruby-keyword kw">end</span>
|
393
299
|
</pre>
|
394
300
|
</div>
|
395
301
|
</div>
|
396
302
|
</div>
|
397
303
|
<div class="method">
|
398
304
|
<div class="title">
|
399
|
-
<a name="
|
305
|
+
<a name="M000472"></a><b>after</b>(time)
|
400
306
|
</div>
|
401
|
-
|
402
|
-
<p>
|
403
|
-
|
404
|
-
</p>
|
405
|
-
<p>
|
406
|
-
<b>Example</b>
|
407
|
-
</p>
|
307
|
+
<div class="sourcecode">
|
308
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000472_source')" id="l_M000472_source">+</a> ]</p>
|
309
|
+
<div id="M000472_source" class="dyn-source">
|
408
310
|
<pre>
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
311
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 211</span>
|
312
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after</span>(<span class="ruby-identifier">time</span>)
|
313
|
+
<span class="ruby-ivar">@seconds</span>.<span class="ruby-identifier">after</span>(<span class="ruby-identifier">time</span>)
|
314
|
+
<span class="ruby-keyword kw">end</span>
|
413
315
|
</pre>
|
414
316
|
</div>
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
<div class="method">
|
320
|
+
<div class="title">
|
321
|
+
<a name="M000471"></a><b>before</b>(time)
|
322
|
+
</div>
|
415
323
|
<div class="sourcecode">
|
416
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
417
|
-
<div id="
|
324
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000471_source')" id="l_M000471_source">+</a> ]</p>
|
325
|
+
<div id="M000471_source" class="dyn-source">
|
418
326
|
<pre>
|
419
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
420
|
-
|
421
|
-
|
422
|
-
|
327
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 206</span>
|
328
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before</span>(<span class="ruby-identifier">time</span>)
|
329
|
+
<span class="ruby-ivar">@seconds</span>.<span class="ruby-identifier">before</span>(<span class="ruby-identifier">time</span>)
|
330
|
+
<span class="ruby-keyword kw">end</span>
|
423
331
|
</pre>
|
424
332
|
</div>
|
425
333
|
</div>
|
426
334
|
</div>
|
427
335
|
<div class="method">
|
428
336
|
<div class="title">
|
429
|
-
<a name="
|
337
|
+
<a name="M000460"></a><b>days</b>()
|
430
338
|
</div>
|
431
|
-
|
432
|
-
<p>
|
433
|
-
|
434
|
-
<a href="Duration.html#M000460">seconds</a>.
|
435
|
-
</p>
|
436
|
-
<p>
|
437
|
-
<b>Example</b>
|
438
|
-
</p>
|
439
|
-
<pre>
|
440
|
-
Duration.new(:weeks => 1, :seconds => 30).each do |part, time|
|
441
|
-
puts "part: #{part}, time: #{time}"
|
442
|
-
end
|
443
|
-
</pre>
|
444
|
-
<p>
|
445
|
-
<em>Output</em>
|
446
|
-
</p>
|
339
|
+
<div class="sourcecode">
|
340
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000460_source')" id="l_M000460_source">+</a> ]</p>
|
341
|
+
<div id="M000460_source" class="dyn-source">
|
447
342
|
<pre>
|
448
|
-
|
449
|
-
|
450
|
-
part: hours, time: 0
|
451
|
-
part: minutes, time: 0
|
452
|
-
part: seconds, time: 30
|
343
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 116</span>
|
344
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:days</span>] ; <span class="ruby-keyword kw">end</span>
|
453
345
|
</pre>
|
454
346
|
</div>
|
347
|
+
</div>
|
348
|
+
</div>
|
349
|
+
<div class="method">
|
350
|
+
<div class="title">
|
351
|
+
<a name="M000461"></a><b>hours</b>()
|
352
|
+
</div>
|
455
353
|
<div class="sourcecode">
|
456
354
|
<p class="source-link">[ <a href="javascript:toggleSource('M000461_source')" id="l_M000461_source">+</a> ]</p>
|
457
355
|
<div id="M000461_source" class="dyn-source">
|
458
356
|
<pre>
|
459
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
460
|
-
|
461
|
-
[[<span class="ruby-value str">'weeks'</span> , <span class="ruby-ivar">@weeks</span> ],
|
462
|
-
[<span class="ruby-value str">'days'</span> , <span class="ruby-ivar">@days</span> ],
|
463
|
-
[<span class="ruby-value str">'hours'</span> , <span class="ruby-ivar">@hours</span> ],
|
464
|
-
[<span class="ruby-value str">'minutes'</span> , <span class="ruby-ivar">@minutes</span>],
|
465
|
-
[<span class="ruby-value str">'seconds'</span> , <span class="ruby-ivar">@seconds</span>]].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span>, <span class="ruby-identifier">time</span><span class="ruby-operator">|</span>
|
466
|
-
<span class="ruby-comment cmt"># Yield to block</span>
|
467
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">part</span>, <span class="ruby-identifier">time</span>
|
468
|
-
<span class="ruby-keyword kw">end</span>
|
469
|
-
<span class="ruby-keyword kw">end</span>
|
357
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 117</span>
|
358
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hours</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:hours</span>] ; <span class="ruby-keyword kw">end</span>
|
470
359
|
</pre>
|
471
360
|
</div>
|
472
361
|
</div>
|
473
362
|
</div>
|
474
363
|
<div class="method">
|
475
364
|
<div class="title">
|
476
|
-
<a name="
|
477
|
-
</div>
|
478
|
-
<div class="description">
|
479
|
-
<p>
|
480
|
-
Set the number of hours.
|
481
|
-
</p>
|
482
|
-
<p>
|
483
|
-
<b>Example</b>
|
484
|
-
</p>
|
485
|
-
<pre>
|
486
|
-
d = Duration.new(0)
|
487
|
-
=> #<Duration: ...>
|
488
|
-
d.hours = 5; d
|
489
|
-
=> #<Duration: 5 hours>
|
490
|
-
</pre>
|
365
|
+
<a name="M000450"></a><b>inspect</b>()
|
491
366
|
</div>
|
492
367
|
<div class="sourcecode">
|
493
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
494
|
-
<div id="
|
368
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000450_source')" id="l_M000450_source">+</a> ]</p>
|
369
|
+
<div id="M000450_source" class="dyn-source">
|
495
370
|
<pre>
|
496
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
497
|
-
|
498
|
-
|
499
|
-
<span class="ruby-keyword kw">
|
371
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 50</span>
|
372
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
373
|
+
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">to_h</span>
|
374
|
+
<span class="ruby-identifier">segments</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
375
|
+
<span class="ruby-node">"#{h[l.to_sym]} #{l}"</span>
|
376
|
+
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
377
|
+
<span class="ruby-keyword kw">end</span>
|
500
378
|
</pre>
|
501
379
|
</div>
|
502
380
|
</div>
|
503
381
|
</div>
|
504
382
|
<div class="method">
|
505
383
|
<div class="title">
|
506
|
-
<a name="
|
507
|
-
</div>
|
508
|
-
<div class="description">
|
509
|
-
<p>
|
510
|
-
Inspection string—Similar to <a href="Duration.html#M000468">to_s</a>
|
511
|
-
except that it has the class name.
|
512
|
-
</p>
|
513
|
-
<p>
|
514
|
-
<b>Example</b>
|
515
|
-
</p>
|
516
|
-
<pre>
|
517
|
-
Duration.new(:seconds => 140)
|
518
|
-
=> #<Duration: 2 minutes and 20 seconds>
|
519
|
-
</pre>
|
384
|
+
<a name="M000462"></a><b>minutes</b>()
|
520
385
|
</div>
|
521
386
|
<div class="sourcecode">
|
522
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
523
|
-
<div id="
|
387
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000462_source')" id="l_M000462_source">+</a> ]</p>
|
388
|
+
<div id="M000462_source" class="dyn-source">
|
524
389
|
<pre>
|
525
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
526
|
-
|
527
|
-
<span class="ruby-node">"#<#{self.class}: #{(s = to_s).empty? ? '...' : s}>"</span>
|
528
|
-
<span class="ruby-keyword kw">end</span>
|
390
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 118</span>
|
391
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">minutes</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:minutes</span>] ; <span class="ruby-keyword kw">end</span>
|
529
392
|
</pre>
|
530
393
|
</div>
|
531
394
|
</div>
|
532
395
|
</div>
|
533
396
|
<div class="method">
|
534
397
|
<div class="title">
|
535
|
-
<a name="
|
536
|
-
</div>
|
537
|
-
<div class="description">
|
538
|
-
<p>
|
539
|
-
Set the number of minutes.
|
540
|
-
</p>
|
541
|
-
<p>
|
542
|
-
<b>Example</b>
|
543
|
-
</p>
|
544
|
-
<pre>
|
545
|
-
d = Duration.new(0)
|
546
|
-
=> #<Duration: ...>
|
547
|
-
d.minutes = 30; d
|
548
|
-
=> #<Duration: 30 minutes>
|
549
|
-
</pre>
|
398
|
+
<a name="M000449"></a><b>reset_segments</b>(*segments)
|
550
399
|
</div>
|
551
400
|
<div class="sourcecode">
|
552
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
553
|
-
<div id="
|
554
|
-
<pre>
|
555
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
556
|
-
|
557
|
-
|
401
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000449_source')" id="l_M000449_source">+</a> ]</p>
|
402
|
+
<div id="M000449_source" class="dyn-source">
|
403
|
+
<pre>
|
404
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 28</span>
|
405
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_segments</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
406
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">segments</span>.<span class="ruby-identifier">size</span>
|
407
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
408
|
+
<span class="ruby-ivar">@segments</span> = [<span class="ruby-identifier">:days</span>, <span class="ruby-identifier">:hours</span>, <span class="ruby-identifier">:minutes</span>, <span class="ruby-identifier">:seconds</span>]
|
409
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
|
410
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">segments</span> = <span class="ruby-identifier">segments</span>[<span class="ruby-value">0</span>]
|
411
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
|
412
|
+
<span class="ruby-ivar">@segments</span> = <span class="ruby-identifier">segments</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">p</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>.<span class="ruby-identifier">chomp</span>(<span class="ruby-value str">'s'</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">'s'</span>).<span class="ruby-identifier">to_sym</span> }
|
413
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">all?</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-constant">SEGMENTS</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">s</span>) }
|
414
|
+
<span class="ruby-keyword kw">else</span>
|
415
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-constant">SEGMENTS</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">segments</span>)
|
416
|
+
<span class="ruby-ivar">@segments</span> = <span class="ruby-constant">SEGMENTS</span>[<span class="ruby-identifier">f</span><span class="ruby-operator">..</span><span class="ruby-value">0</span>]
|
417
|
+
<span class="ruby-keyword kw">end</span>
|
418
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span>
|
419
|
+
<span class="ruby-identifier">f</span> = <span class="ruby-constant">SEGMENTS</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">segments</span>[<span class="ruby-value">0</span>])
|
420
|
+
<span class="ruby-identifier">t</span> = <span class="ruby-constant">SEGMENTS</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">segments</span>[<span class="ruby-value">1</span>])
|
421
|
+
<span class="ruby-ivar">@segments</span> = <span class="ruby-constant">SEGMENTS</span>[<span class="ruby-identifier">f</span><span class="ruby-operator">..</span><span class="ruby-identifier">t</span>]
|
422
|
+
<span class="ruby-keyword kw">else</span>
|
423
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>
|
558
424
|
<span class="ruby-keyword kw">end</span>
|
425
|
+
<span class="ruby-keyword kw">end</span>
|
559
426
|
</pre>
|
560
427
|
</div>
|
561
428
|
</div>
|
562
429
|
</div>
|
563
430
|
<div class="method">
|
564
431
|
<div class="title">
|
565
|
-
<a name="
|
566
|
-
</div>
|
567
|
-
<div class="description">
|
568
|
-
<p>
|
569
|
-
Get the number of <a href="Duration.html#M000460">seconds</a> of a given
|
570
|
-
part, or simply just get the number of <a
|
571
|
-
href="Duration.html#M000460">seconds</a>.
|
572
|
-
</p>
|
573
|
-
<p>
|
574
|
-
<b>Example</b>
|
575
|
-
</p>
|
576
|
-
<pre>
|
577
|
-
d = Duration.new(:weeks => 1, :days => 1, :hours => 1, :seconds => 30)
|
578
|
-
=> #<Duration: 1 week, 1 day, 1 hour and 30 seconds>
|
579
|
-
d.seconds(:weeks)
|
580
|
-
=> 604800
|
581
|
-
d.seconds(:days)
|
582
|
-
=> 86400
|
583
|
-
d.seconds(:hours)
|
584
|
-
=> 3600
|
585
|
-
d.seconds
|
586
|
-
=> 30
|
587
|
-
</pre>
|
432
|
+
<a name="M000463"></a><b>seconds</b>()
|
588
433
|
</div>
|
589
434
|
<div class="sourcecode">
|
590
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
591
|
-
<div id="
|
435
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000463_source')" id="l_M000463_source">+</a> ]</p>
|
436
|
+
<div id="M000463_source" class="dyn-source">
|
592
437
|
<pre>
|
593
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
594
|
-
|
595
|
-
<span class="ruby-comment cmt"># Table mapping</span>
|
596
|
-
<span class="ruby-identifier">h</span> = {<span class="ruby-identifier">:weeks</span> =<span class="ruby-operator">></span> <span class="ruby-constant">WEEK</span>, <span class="ruby-identifier">:days</span> =<span class="ruby-operator">></span> <span class="ruby-constant">DAY</span>, <span class="ruby-identifier">:hours</span> =<span class="ruby-operator">></span> <span class="ruby-constant">HOUR</span>, <span class="ruby-identifier">:minutes</span> =<span class="ruby-operator">></span> <span class="ruby-constant">MINUTE</span>}
|
597
|
-
|
598
|
-
<span class="ruby-keyword kw">if</span> [<span class="ruby-identifier">:weeks</span>, <span class="ruby-identifier">:days</span>, <span class="ruby-identifier">:hours</span>, <span class="ruby-identifier">:minutes</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">part</span>
|
599
|
-
<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">part</span>) <span class="ruby-operator">*</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">part</span>]
|
600
|
-
<span class="ruby-keyword kw">else</span>
|
601
|
-
<span class="ruby-ivar">@seconds</span>
|
602
|
-
<span class="ruby-keyword kw">end</span>
|
603
|
-
<span class="ruby-keyword kw">end</span>
|
438
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 119</span>
|
439
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">seconds</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:seconds</span>] ; <span class="ruby-keyword kw">end</span>
|
604
440
|
</pre>
|
605
441
|
</div>
|
606
442
|
</div>
|
607
443
|
</div>
|
608
444
|
<div class="method">
|
609
445
|
<div class="title">
|
610
|
-
<a name="
|
446
|
+
<a name="M000469"></a><b>segmented</b>(*segments)
|
611
447
|
</div>
|
612
|
-
|
613
|
-
<p>
|
614
|
-
|
615
|
-
</p>
|
616
|
-
<p>
|
617
|
-
<b>Example</b>
|
618
|
-
</p>
|
448
|
+
<div class="sourcecode">
|
449
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000469_source')" id="l_M000469_source">+</a> ]</p>
|
450
|
+
<div id="M000469_source" class="dyn-source">
|
619
451
|
<pre>
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
452
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 140</span>
|
453
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">segmented</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">segments</span>)
|
454
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@seconds</span>, <span class="ruby-identifier">segments</span>)
|
455
|
+
<span class="ruby-comment cmt">#segments = segments.collect{ |p| p.to_s.downcase.chomp('s') }</span>
|
456
|
+
<span class="ruby-comment cmt">#y,w,d,h,m,s = nil,nil,nil,nil,nil,nil</span>
|
457
|
+
<span class="ruby-comment cmt">#x = @seconds</span>
|
458
|
+
<span class="ruby-comment cmt">#y, x = *x.divmod(YEAR) if segments.include?('year')</span>
|
459
|
+
<span class="ruby-comment cmt">#w, x = *x.divmod(WEEK) if segments.include?('week')</span>
|
460
|
+
<span class="ruby-comment cmt">#d, x = *x.divmod(DAY) if segments.include?('day')</span>
|
461
|
+
<span class="ruby-comment cmt">#h, x = *x.divmod(HOUR) if segments.include?('hour')</span>
|
462
|
+
<span class="ruby-comment cmt">#m, x = *x.divmod(MINUTE) if segments.include?('minute')</span>
|
463
|
+
<span class="ruby-comment cmt">#s = x if segments.include?('second')</span>
|
464
|
+
<span class="ruby-comment cmt">#[y, w, d, h, m, s].compact</span>
|
465
|
+
<span class="ruby-keyword kw">end</span>
|
624
466
|
</pre>
|
625
467
|
</div>
|
468
|
+
</div>
|
469
|
+
</div>
|
470
|
+
<div class="method">
|
471
|
+
<div class="title">
|
472
|
+
<a name="M000448"></a><b>segments</b>()
|
473
|
+
</div>
|
626
474
|
<div class="sourcecode">
|
627
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
628
|
-
<div id="
|
475
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000448_source')" id="l_M000448_source">+</a> ]</p>
|
476
|
+
<div id="M000448_source" class="dyn-source">
|
629
477
|
<pre>
|
630
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
631
|
-
|
632
|
-
<span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">:seconds</span> =<span class="ruby-operator">></span> (<span class="ruby-ivar">@total</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">n</span>) <span class="ruby-operator">-</span> <span class="ruby-ivar">@seconds</span>)
|
633
|
-
<span class="ruby-keyword kw">end</span>
|
478
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 25</span>
|
479
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">segments</span>; <span class="ruby-ivar">@segments</span>; <span class="ruby-keyword kw">end</span>
|
634
480
|
</pre>
|
635
481
|
</div>
|
636
482
|
</div>
|
637
483
|
</div>
|
638
484
|
<div class="method">
|
639
485
|
<div class="title">
|
640
|
-
<a name="
|
486
|
+
<a name="M000470"></a><b>strftime</b>(fmt)
|
641
487
|
</div>
|
642
488
|
<div class="description">
|
643
489
|
<p>
|
@@ -667,94 +513,172 @@ Format duration.
|
|
667
513
|
</pre>
|
668
514
|
</div>
|
669
515
|
<div class="sourcecode">
|
670
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
671
|
-
<div id="
|
516
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000470_source')" id="l_M000470_source">+</a> ]</p>
|
517
|
+
<div id="M000470_source" class="dyn-source">
|
672
518
|
<pre>
|
673
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
519
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 174</span>
|
520
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">fmt</span>)
|
521
|
+
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">to_h</span>
|
522
|
+
<span class="ruby-identifier">hx</span> = {
|
523
|
+
<span class="ruby-value str">'y'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:years</span>] ,
|
524
|
+
<span class="ruby-value str">'w'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:weeks</span>] ,
|
525
|
+
<span class="ruby-value str">'d'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:days</span>] ,
|
526
|
+
<span class="ruby-value str">'h'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:hours</span>] ,
|
527
|
+
<span class="ruby-value str">'m'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:minutes</span>],
|
528
|
+
<span class="ruby-value str">'s'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">:seconds</span>],
|
529
|
+
<span class="ruby-value str">'t'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">total</span>,
|
530
|
+
<span class="ruby-value str">'x'</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">to_s</span>
|
531
|
+
}
|
532
|
+
<span class="ruby-identifier">fmt</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/%?%(w|d|h|m|s|t|x)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
|
533
|
+
<span class="ruby-identifier">hx</span>[<span class="ruby-identifier">match</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">1</span>]]
|
534
|
+
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">'%%'</span>, <span class="ruby-value str">'%'</span>)
|
535
|
+
<span class="ruby-keyword kw">end</span>
|
688
536
|
</pre>
|
689
537
|
</div>
|
690
538
|
</div>
|
691
539
|
</div>
|
692
540
|
<div class="method">
|
693
541
|
<div class="title">
|
694
|
-
<a name="
|
542
|
+
<a name="M000453"></a><b>to_a</b>()
|
695
543
|
</div>
|
696
|
-
|
697
|
-
<p>
|
698
|
-
|
699
|
-
</p>
|
700
|
-
<p>
|
701
|
-
<b>Example</b>
|
702
|
-
</p>
|
544
|
+
<div class="sourcecode">
|
545
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000453_source')" id="l_M000453_source">+</a> ]</p>
|
546
|
+
<div id="M000453_source" class="dyn-source">
|
703
547
|
<pre>
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
548
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 62</span>
|
549
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_a</span>
|
550
|
+
<span class="ruby-identifier">a</span>, <span class="ruby-identifier">s</span> = [], <span class="ruby-ivar">@seconds</span>
|
551
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">5</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">YEAR</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:years</span>)
|
552
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">4</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">WEEK</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:weeks</span>)
|
553
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">3</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">DAY</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:days</span>)
|
554
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">2</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">HOUR</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:hours</span>)
|
555
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">1</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">MINUTE</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:minutes</span>)
|
556
|
+
<span class="ruby-identifier">a</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">SECOND</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:seconds</span>)
|
557
|
+
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">reverse</span>
|
558
|
+
<span class="ruby-keyword kw">end</span>
|
708
559
|
</pre>
|
709
560
|
</div>
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
<div class="method">
|
564
|
+
<div class="title">
|
565
|
+
<a name="M000452"></a><b>to_f</b>()
|
566
|
+
</div>
|
710
567
|
<div class="sourcecode">
|
711
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
712
|
-
<div id="
|
568
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000452_source')" id="l_M000452_source">+</a> ]</p>
|
569
|
+
<div id="M000452_source" class="dyn-source">
|
713
570
|
<pre>
|
714
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
571
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 58</span>
|
572
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_f</span> ; <span class="ruby-ivar">@seconds</span>.<span class="ruby-identifier">to_f</span> ; <span class="ruby-keyword kw">end</span>
|
573
|
+
</pre>
|
574
|
+
</div>
|
575
|
+
</div>
|
576
|
+
</div>
|
577
|
+
<div class="method">
|
578
|
+
<div class="title">
|
579
|
+
<a name="M000454"></a><b>to_h</b>()
|
580
|
+
</div>
|
581
|
+
<div class="sourcecode">
|
582
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000454_source')" id="l_M000454_source">+</a> ]</p>
|
583
|
+
<div id="M000454_source" class="dyn-source">
|
584
|
+
<pre>
|
585
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 74</span>
|
586
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>
|
587
|
+
<span class="ruby-identifier">h</span>, <span class="ruby-identifier">s</span> = {}, <span class="ruby-ivar">@seconds</span>
|
588
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:years</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">YEAR</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:years</span>)
|
589
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:weeks</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">WEEK</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:weeks</span>)
|
590
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:days</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">DAY</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:days</span>)
|
591
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:hours</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">HOUR</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:hours</span>)
|
592
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:minutes</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">MINUTE</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:minutes</span>)
|
593
|
+
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">:seconds</span>], <span class="ruby-identifier">s</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">s</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-constant">SECOND</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@segments</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:seconds</span>)
|
594
|
+
<span class="ruby-identifier">h</span>
|
595
|
+
<span class="ruby-keyword kw">end</span>
|
596
|
+
</pre>
|
597
|
+
</div>
|
598
|
+
</div>
|
599
|
+
</div>
|
600
|
+
<div class="method">
|
601
|
+
<div class="title">
|
602
|
+
<a name="M000451"></a><b>to_i</b>()
|
603
|
+
</div>
|
604
|
+
<div class="sourcecode">
|
605
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000451_source')" id="l_M000451_source">+</a> ]</p>
|
606
|
+
<div id="M000451_source" class="dyn-source">
|
607
|
+
<pre>
|
608
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 57</span>
|
609
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_i</span> ; <span class="ruby-ivar">@seconds</span>.<span class="ruby-identifier">to_i</span> ; <span class="ruby-keyword kw">end</span>
|
610
|
+
</pre>
|
611
|
+
</div>
|
612
|
+
</div>
|
613
|
+
</div>
|
614
|
+
<div class="method">
|
615
|
+
<div class="title">
|
616
|
+
<a name="M000455"></a><b>to_s</b>()
|
617
|
+
</div>
|
618
|
+
<div class="sourcecode">
|
619
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000455_source')" id="l_M000455_source">+</a> ]</p>
|
620
|
+
<div id="M000455_source" class="dyn-source">
|
621
|
+
<pre>
|
622
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 85</span>
|
623
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
|
624
|
+
<span class="ruby-identifier">h</span> = <span class="ruby-identifier">to_h</span>
|
625
|
+
<span class="ruby-identifier">segments</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span>
|
626
|
+
<span class="ruby-node">"#{h[l.to_sym]} #{l}"</span>
|
627
|
+
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
628
|
+
<span class="ruby-keyword kw">end</span>
|
629
|
+
</pre>
|
630
|
+
</div>
|
631
|
+
</div>
|
632
|
+
</div>
|
633
|
+
<div class="method">
|
634
|
+
<div class="title">
|
635
|
+
<a name="M000464"></a><b>total</b>()
|
636
|
+
</div>
|
637
|
+
<div class="sourcecode">
|
638
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000464_source')" id="l_M000464_source">+</a> ]</p>
|
639
|
+
<div id="M000464_source" class="dyn-source">
|
640
|
+
<pre>
|
641
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 121</span>
|
642
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">total</span> ; <span class="ruby-identifier">seconds</span> ; <span class="ruby-keyword kw">end</span>
|
643
|
+
</pre>
|
644
|
+
</div>
|
645
|
+
</div>
|
646
|
+
</div>
|
647
|
+
<div class="method">
|
648
|
+
<div class="title">
|
649
|
+
<a name="M000459"></a><b>weeks</b>()
|
650
|
+
</div>
|
651
|
+
<div class="sourcecode">
|
652
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000459_source')" id="l_M000459_source">+</a> ]</p>
|
653
|
+
<div id="M000459_source" class="dyn-source">
|
654
|
+
<pre>
|
655
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 115</span>
|
656
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weeks</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:weeks</span>] ; <span class="ruby-keyword kw">end</span>
|
728
657
|
</pre>
|
729
658
|
</div>
|
730
659
|
</div>
|
731
660
|
</div>
|
732
661
|
<div class="method">
|
733
662
|
<div class="title">
|
734
|
-
<a name="
|
663
|
+
<a name="M000458"></a><b>years</b>()
|
735
664
|
</div>
|
736
665
|
<div class="description">
|
737
666
|
<p>
|
738
|
-
|
739
|
-
</p>
|
740
|
-
<p>
|
741
|
-
<b>Example</b>
|
667
|
+
def self.===(other) #:nodoc:
|
742
668
|
</p>
|
743
669
|
<pre>
|
744
|
-
|
745
|
-
=> #<Duration: ...>
|
746
|
-
d.weeks = 2; d
|
747
|
-
=> #<Duration: 2 weeks>
|
670
|
+
other.is_a?(Duration) rescue super
|
748
671
|
</pre>
|
672
|
+
<p>
|
673
|
+
end
|
674
|
+
</p>
|
749
675
|
</div>
|
750
676
|
<div class="sourcecode">
|
751
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
752
|
-
<div id="
|
677
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000458_source')" id="l_M000458_source">+</a> ]</p>
|
678
|
+
<div id="M000458_source" class="dyn-source">
|
753
679
|
<pre>
|
754
|
-
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line
|
755
|
-
|
756
|
-
<span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">:weeks</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">n</span>, <span class="ruby-identifier">:seconds</span> =<span class="ruby-operator">></span> <span class="ruby-ivar">@total</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">seconds</span>(<span class="ruby-identifier">:weeks</span>))
|
757
|
-
<span class="ruby-keyword kw">end</span>
|
680
|
+
<span class="ruby-comment cmt"># File lib/more/facets/duration.rb, line 114</span>
|
681
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">years</span> ; <span class="ruby-identifier">to_h</span>[<span class="ruby-identifier">:years</span>] ; <span class="ruby-keyword kw">end</span>
|
758
682
|
</pre>
|
759
683
|
</div>
|
760
684
|
</div>
|