facets 1.4.5 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/demo/tkxml/helloworld.rb +32 -0
- data/demo/tkxml/ui.xml +32 -0
- data/doc/AUTHORS +2 -0
- data/doc/ChangeLog +92 -337
- data/doc/ChangeLog.pre1.5 +337 -0
- data/doc/LATEST +41 -0
- data/doc/manifest +1209 -0
- data/lib/facet/array/op_div.rb +1 -0
- data/lib/facet/autoarray.rb +1 -0
- data/lib/facet/cut.rb +1 -0
- data/lib/facet/enumerable/divide.rb +1 -0
- data/lib/facet/eventhook.rb +1 -0
- data/lib/facet/hash/diff.rb +1 -0
- data/lib/facet/hash/having_aquisition.rb +1 -0
- data/lib/facet/hash/having_fallback.rb +1 -0
- data/lib/facet/hash/normalize_keys.rb +1 -0
- data/lib/facet/hash/op_div.rb +1 -0
- data/lib/facet/hash/reverse_merge.rb +1 -0
- data/lib/facet/hash/reverse_update.rb +1 -0
- data/lib/facet/hash/self/auto.rb +1 -0
- data/lib/facet/hash/symbolize_keys.rb +1 -0
- data/lib/facet/hash/to_struct.rb +1 -0
- data/lib/facet/infinity.rb +1 -0
- data/lib/facet/instance_intercept.rb +1 -0
- data/lib/facet/integer/each.rb +1 -0
- data/lib/facet/integer/of.rb +1 -0
- data/lib/facet/kernel/callee.rb +1 -0
- data/lib/facet/kernel/deep_clone.rb +1 -0
- data/lib/facet/kernel/instance_exec.rb +1 -0
- data/lib/facet/kernel/meta.rb +1 -0
- data/lib/facet/kernel/object_clone.rb +1 -0
- data/lib/facet/kernel/object_dup.rb +1 -0
- data/lib/facet/kernel/to_data.rb +1 -0
- data/lib/facet/methodfilter.rb +1 -0
- data/lib/facet/numeric/distance.rb +1 -0
- data/lib/facet/predicate.rb +1 -0
- data/lib/facet/rwdelegator.rb +1 -0
- data/lib/facet/settings.rb +1 -0
- data/lib/facet/string/divide.rb +1 -0
- data/lib/facet/symbol/self/generate.rb +1 -0
- data/lib/facet/tkxml.rb +1 -0
- data/lib/facets.rb +4 -2
- data/lib/facets/core/array/op_div.rb +11 -0
- data/lib/facets/core/enumerable/divide.rb +20 -0
- data/lib/facets/core/hash/diff.rb +8 -0
- data/lib/facets/core/hash/having_aquisition.rb +37 -0
- data/lib/facets/core/hash/having_fallback.rb +28 -0
- data/lib/facets/core/hash/keys_to_s.rb +2 -80
- data/lib/facets/core/hash/keys_to_sym.rb +2 -91
- data/lib/facets/core/hash/normalize_keys.rb +65 -0
- data/lib/facets/core/hash/op_div.rb +8 -0
- data/lib/facets/core/hash/reverse_merge.rb +22 -0
- data/lib/facets/core/hash/reverse_update.rb +3 -0
- data/lib/facets/core/hash/self/auto.rb +28 -0
- data/lib/facets/core/hash/stringify_keys.rb +74 -2
- data/lib/facets/core/hash/symbolize_keys.rb +87 -0
- data/lib/facets/core/hash/to_struct.rb +16 -0
- data/lib/facets/core/integer/each.rb +9 -0
- data/lib/facets/core/integer/of.rb +37 -0
- data/lib/facets/core/kernel/__method__.rb +2 -45
- data/lib/facets/core/kernel/callee.rb +46 -0
- data/lib/facets/core/kernel/deep_clone.rb +50 -0
- data/lib/facets/core/kernel/instance_exec.rb +58 -0
- data/lib/facets/core/kernel/meta.rb +21 -0
- data/lib/facets/core/kernel/object_clone.rb +4 -0
- data/lib/facets/core/kernel/object_dup.rb +2 -0
- data/lib/facets/core/kernel/to_data.rb +114 -0
- data/lib/facets/core/module/alias_method_chain.rb +1 -1
- data/lib/facets/core/module/wrap_method.rb +2 -2
- data/lib/facets/core/nilclass/status.rb +4 -4
- data/lib/facets/core/numeric/distance.rb +37 -0
- data/lib/facets/core/proc/compose.rb +3 -21
- data/lib/facets/core/proc/op_mul.rb +51 -2
- data/lib/facets/core/proc/to_method.rb +37 -36
- data/lib/facets/core/string/divide.rb +43 -0
- data/lib/facets/core/string/singular.rb +152 -67
- data/lib/facets/core/symbol/self/generate.rb +18 -0
- data/lib/facets/more/annattr.rb +4 -4
- data/lib/facets/more/annotation.rb +359 -296
- data/lib/facets/more/aspects.rb +1 -1
- data/lib/facets/more/autoarray.rb +82 -0
- data/lib/facets/more/builderobject.rb +5 -3
- data/lib/facets/more/command.rb +2 -0
- data/lib/facets/more/cut.rb +507 -0
- data/lib/facets/more/dictionary.rb +64 -30
- data/lib/facets/more/downloader.rb +6 -3
- data/lib/facets/more/elementor.rb +26 -16
- data/lib/facets/more/eventhook.rb +113 -0
- data/lib/facets/more/filelist.rb +8 -0
- data/lib/facets/more/functor.rb +28 -11
- data/lib/facets/more/hashbuilder.rb +7 -3
- data/lib/facets/more/infinity.rb +221 -0
- data/{snip/more/aspect.rb → lib/facets/more/instance_intercept.rb} +56 -20
- data/lib/facets/more/json.rb +5 -5
- data/lib/facets/more/methodfilter.rb +118 -0
- data/lib/facets/more/opencascade.rb +35 -66
- data/lib/facets/more/openobject.rb +213 -162
- data/lib/facets/more/orderedhash.rb +7 -0
- data/{snip → lib/facets}/more/predicate.rb +3 -0
- data/lib/facets/more/recorder.rb +9 -3
- data/lib/facets/more/reference.rb +7 -2
- data/lib/facets/more/rexmlbuilder.rb +7 -2
- data/lib/facets/more/rwdelegator.rb +51 -0
- data/lib/facets/more/settings.rb +219 -0
- data/lib/facets/more/snapshot.rb +4 -2
- data/lib/facets/more/tagiterator.rb +4 -4
- data/lib/facets/more/taskable.rb +5 -5
- data/lib/facets/more/tkxml.rb +171 -0
- data/meta/projectinfo +38 -0
- data/{Reapfile → meta/reapfile} +0 -0
- data/meta/task +74 -0
- data/meta/tasks/calibre.rb +16 -0
- data/meta/version +1 -0
- data/test/lib/facets/core/array/test_at_rand.rb +1 -1
- data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
- data/test/lib/facets/core/array/test_first.rb +1 -1
- data/test/lib/facets/core/array/test_head.rb +1 -1
- data/test/lib/facets/core/array/test_last_index.rb +1 -1
- data/test/lib/facets/core/array/test_merge.rb +1 -1
- data/test/lib/facets/core/array/test_mid.rb +1 -1
- data/test/lib/facets/core/array/test_middle.rb +1 -1
- data/test/lib/facets/core/array/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/array/test_op_store.rb +1 -1
- data/test/lib/facets/core/array/test_pick.rb +1 -1
- data/test/lib/facets/core/array/test_pos.rb +1 -1
- data/test/lib/facets/core/array/test_pot.rb +1 -1
- data/test/lib/facets/core/array/test_pull.rb +1 -1
- data/test/lib/facets/core/array/test_rand_index.rb +1 -1
- data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
- data/test/lib/facets/core/array/test_range.rb +1 -1
- data/test/lib/facets/core/array/test_rotate.rb +1 -1
- data/test/lib/facets/core/array/test_select.rb +1 -1
- data/test/lib/facets/core/array/test_shuffle.rb +1 -1
- data/test/lib/facets/core/array/test_thru.rb +1 -1
- data/test/lib/facets/core/array/test_to_b.rb +1 -1
- data/test/lib/facets/core/array/test_to_h.rb +1 -1
- data/test/lib/facets/core/array/test_to_hash.rb +1 -1
- data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
- data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
- data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
- data/test/lib/facets/core/binding/test_called.rb +1 -1
- data/test/lib/facets/core/binding/test_caller.rb +1 -1
- data/test/lib/facets/core/binding/test_defined.rb +1 -1
- data/test/lib/facets/core/binding/test_eval.rb +1 -1
- data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
- data/test/lib/facets/core/binding/test_method_name.rb +1 -1
- data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/binding/test_op_store.rb +1 -1
- data/test/lib/facets/core/binding/test_self.rb +1 -1
- data/test/lib/facets/core/class/test_cattr.rb +1 -1
- data/test/lib/facets/core/class/test_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_method_name.rb +1 -1
- data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_unix_path.rb +1 -1
- data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
- data/test/lib/facets/core/comparable/test_clip.rb +1 -1
- data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
- data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
- data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
- data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
- data/test/lib/facets/core/date/test_stamp.rb +1 -1
- data/test/lib/facets/core/date/test_to_date.rb +1 -1
- data/test/lib/facets/core/date/test_to_s.rb +1 -1
- data/test/lib/facets/core/date/test_to_time.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
- data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
- data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_count.rb +1 -1
- data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_slice.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_every.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
- data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
- data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
- data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_none.rb +1 -1
- data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
- data/test/lib/facets/core/enumerable/test_one.rb +1 -1
- data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
- data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
- data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
- data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
- data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
- data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
- data/test/lib/facets/core/file/self/test_create.rb +1 -1
- data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
- data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
- data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
- data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
- data/test/lib/facets/core/float/test_round_at.rb +1 -1
- data/test/lib/facets/core/float/test_round_to.rb +1 -1
- data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
- data/test/lib/facets/core/hash/test_alias.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_at.rb +1 -1
- data/test/lib/facets/core/hash/test_collate.rb +1 -1
- data/test/lib/facets/core/hash/test_each.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
- data/test/lib/facets/core/hash/test_graph.rb +1 -1
- data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_inverse.rb +1 -1
- data/test/lib/facets/core/hash/test_normalize_keys.rb +34 -0
- data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
- data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
- data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
- data/test/lib/facets/core/hash/test_slice.rb +1 -1
- data/test/lib/facets/core/hash/{test_keys_to_s.rb → test_stringify_keys.rb} +5 -5
- data/test/lib/facets/core/hash/test_swap.rb +1 -1
- data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
- data/test/lib/facets/core/hash/{test_keys_to_sym.rb → test_symbolize_keys.rb} +5 -5
- data/test/lib/facets/core/hash/test_to_h.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
- data/test/lib/facets/core/hash/test_traverse.rb +1 -1
- data/test/lib/facets/core/hash/test_update_each.rb +1 -1
- data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_update_values.rb +1 -1
- data/test/lib/facets/core/hash/test_weave.rb +1 -1
- data/test/lib/facets/core/integer/test_factorial.rb +1 -1
- data/test/lib/facets/core/integer/test_multiple.rb +1 -1
- data/test/lib/facets/core/integer/test_of.rb +28 -0
- data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
- data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
- data/test/lib/facets/core/kernel/test___class__.rb +1 -1
- data/test/lib/facets/core/kernel/test___method__.rb +1 -1
- data/test/lib/facets/core/kernel/test_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_bug.rb +1 -1
- data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
- data/test/lib/facets/core/kernel/test_called.rb +1 -1
- data/test/lib/facets/core/kernel/test_callee.rb +26 -0
- data/test/lib/facets/core/kernel/test_constant.rb +1 -1
- data/test/lib/facets/core/kernel/test_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_demo.rb +1 -1
- data/test/lib/facets/core/kernel/test_fn.rb +1 -1
- data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
- data/test/lib/facets/core/kernel/test_here.rb +1 -1
- data/test/lib/facets/core/kernel/test_in.rb +1 -1
- data/test/lib/facets/core/kernel/test_instance_exec.rb +52 -0
- data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
- data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_method.rb +1 -1
- data/test/lib/facets/core/kernel/test_methods.rb +1 -1
- data/test/lib/facets/core/kernel/test_new.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
- data/test/lib/facets/core/kernel/test_quaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
- data/test/lib/facets/core/kernel/test_resc.rb +1 -1
- data/test/lib/facets/core/kernel/test_returning.rb +1 -1
- data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_silently.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_superior.rb +1 -1
- data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
- data/test/lib/facets/core/kernel/test_this.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_data.rb +59 -0
- data/test/lib/facets/core/kernel/test_uri.rb +1 -1
- data/test/lib/facets/core/kernel/test_val.rb +1 -1
- data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
- data/test/lib/facets/core/matchdata/test_match.rb +1 -1
- data/test/lib/facets/core/matchdata/test_matchtree.rb +1 -1
- data/test/lib/facets/core/module/test_abstract.rb +1 -1
- data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
- data/test/lib/facets/core/module/test_ancestor.rb +1 -1
- data/test/lib/facets/core/module/test_basename.rb +1 -1
- data/test/lib/facets/core/module/test_by_name.rb +1 -1
- data/test/lib/facets/core/module/test_class_extension.rb +1 -1
- data/test/lib/facets/core/module/test_clone_using.rb +1 -1
- data/test/lib/facets/core/module/test_dirname.rb +1 -1
- data/test/lib/facets/core/module/test_equate_on.rb +1 -1
- data/test/lib/facets/core/module/test_include_as.rb +1 -1
- data/test/lib/facets/core/module/test_initializer.rb +1 -1
- data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
- data/test/lib/facets/core/module/test_integrate.rb +1 -1
- data/test/lib/facets/core/module/test_memoize.rb +1 -1
- data/test/lib/facets/core/module/test_modspace.rb +1 -1
- data/test/lib/facets/core/module/test_namespace.rb +1 -1
- data/test/lib/facets/core/module/test_nesting.rb +1 -1
- data/test/lib/facets/core/module/test_nodef.rb +1 -1
- data/test/lib/facets/core/module/test_on_included.rb +1 -1
- data/test/lib/facets/core/module/test_redef.rb +1 -1
- data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
- data/test/lib/facets/core/module/test_redirect.rb +1 -1
- data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
- data/test/lib/facets/core/module/test_remove.rb +1 -1
- data/test/lib/facets/core/module/test_rename.rb +1 -1
- data/test/lib/facets/core/module/test_rename_method.rb +1 -1
- data/test/lib/facets/core/module/test_revisal.rb +1 -1
- data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
- data/test/lib/facets/core/module/test_sort_on.rb +1 -1
- data/test/lib/facets/core/module/test_this.rb +1 -1
- data/test/lib/facets/core/module/test_wrap.rb +1 -1
- data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
- data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
- data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
- data/test/lib/facets/core/nilclass/test_include.rb +1 -1
- data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/nilclass/test_size.rb +1 -1
- data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
- data/test/lib/facets/core/numeric/test_approx.rb +1 -1
- data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
- data/test/lib/facets/core/numeric/test_distance.rb +28 -0
- data/test/lib/facets/core/numeric/test_succ.rb +1 -1
- data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
- data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
- data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
- data/test/lib/facets/core/proc/test_compose.rb +1 -8
- data/test/lib/facets/core/proc/test_op_mul.rb +34 -0
- data/test/lib/facets/core/proc/test_to_method.rb +15 -2
- data/test/lib/facets/core/range/test_to_r.rb +1 -1
- data/test/lib/facets/core/range/test_to_range.rb +1 -1
- data/test/lib/facets/core/range/test_umbrella.rb +1 -1
- data/test/lib/facets/core/range/test_within.rb +1 -1
- data/test/lib/facets/core/regexp/test_arity.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
- data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
- data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
- data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
- data/test/lib/facets/core/string/test_align_center.rb +1 -1
- data/test/lib/facets/core/string/test_at_rand.rb +1 -1
- data/test/lib/facets/core/string/test_basename.rb +1 -1
- data/test/lib/facets/core/string/test_blank.rb +1 -1
- data/test/lib/facets/core/string/test_bracket.rb +1 -1
- data/test/lib/facets/core/string/test_camelcase.rb +1 -1
- data/test/lib/facets/core/string/test_camelize.rb +1 -1
- data/test/lib/facets/core/string/test_capitalized.rb +1 -1
- data/test/lib/facets/core/string/test_chars.rb +1 -1
- data/test/lib/facets/core/string/test_cmp.rb +1 -1
- data/test/lib/facets/core/string/test_demodulize.rb +1 -1
- data/test/lib/facets/core/string/test_divide.rb +29 -0
- data/test/lib/facets/core/string/test_downcase.rb +1 -1
- data/test/lib/facets/core/string/test_dresner.rb +1 -1
- data/test/lib/facets/core/string/test_each_char.rb +1 -1
- data/test/lib/facets/core/string/test_each_word.rb +1 -1
- data/test/lib/facets/core/string/test_first.rb +1 -1
- data/test/lib/facets/core/string/test_fold.rb +1 -1
- data/test/lib/facets/core/string/test_humanize.rb +1 -1
- data/test/lib/facets/core/string/test_indent.rb +1 -1
- data/test/lib/facets/core/string/test_index_all.rb +1 -1
- data/test/lib/facets/core/string/test_last.rb +1 -1
- data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_lines.rb +1 -1
- data/test/lib/facets/core/string/test_lowercase.rb +1 -1
- data/test/lib/facets/core/string/test_margin.rb +1 -1
- data/test/lib/facets/core/string/test_methodize.rb +1 -1
- data/test/lib/facets/core/string/test_modulize.rb +1 -1
- data/test/lib/facets/core/string/test_mscan.rb +1 -1
- data/test/lib/facets/core/string/test_natcmp.rb +1 -1
- data/test/lib/facets/core/string/test_nchar.rb +1 -1
- data/test/lib/facets/core/string/test_pathize.rb +1 -1
- data/test/lib/facets/core/string/test_pop.rb +1 -1
- data/test/lib/facets/core/string/test_pot.rb +1 -1
- data/test/lib/facets/core/string/test_push.rb +1 -1
- data/test/lib/facets/core/string/test_quote.rb +1 -1
- data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
- data/test/lib/facets/core/string/test_rand_index.rb +1 -1
- data/test/lib/facets/core/string/test_range.rb +1 -1
- data/test/lib/facets/core/string/test_range_all.rb +1 -1
- data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
- data/test/lib/facets/core/string/test_regesc.rb +1 -1
- data/test/lib/facets/core/string/test_shatter.rb +1 -1
- data/test/lib/facets/core/string/test_shift.rb +1 -1
- data/test/lib/facets/core/string/test_shuffle.rb +1 -1
- data/test/lib/facets/core/string/test_similarity.rb +1 -1
- data/test/lib/facets/core/string/test_singular.rb +62 -8
- data/test/lib/facets/core/string/test_soundex.rb +1 -1
- data/test/lib/facets/core/string/test_succ.rb +1 -1
- data/test/lib/facets/core/string/test_to_a.rb +1 -1
- data/test/lib/facets/core/string/test_to_b.rb +1 -1
- data/test/lib/facets/core/string/test_to_const.rb +1 -1
- data/test/lib/facets/core/string/test_to_date.rb +1 -1
- data/test/lib/facets/core/string/test_to_proc.rb +1 -1
- data/test/lib/facets/core/string/test_to_re.rb +1 -1
- data/test/lib/facets/core/string/test_to_time.rb +1 -1
- data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
- data/test/lib/facets/core/string/test_unpack.rb +1 -1
- data/test/lib/facets/core/string/test_unshift.rb +1 -1
- data/test/lib/facets/core/string/test_upcase.rb +1 -1
- data/test/lib/facets/core/string/test_whitespace.rb +1 -1
- data/test/lib/facets/core/string/test_word_filter.rb +1 -1
- data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_words.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
- data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_not.rb +1 -1
- data/test/lib/facets/core/symbol/test_pad.rb +1 -1
- data/test/lib/facets/core/symbol/test_succ.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_proc.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
- data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
- data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
- data/test/lib/facets/core/time/test_change.rb +1 -1
- data/test/lib/facets/core/time/test_elapse.rb +1 -1
- data/test/lib/facets/core/time/test_stamp.rb +1 -1
- data/test/lib/facets/core/time/test_to_date.rb +1 -1
- data/test/lib/facets/core/time/test_to_s.rb +1 -1
- data/test/lib/facets/core/time/test_to_time.rb +1 -1
- data/test/lib/facets/more/test_annattr.rb +1 -1
- data/test/lib/facets/more/test_annotation.rb +225 -113
- data/test/lib/facets/more/test_ansicode.rb +1 -1
- data/test/lib/facets/more/test_association.rb +1 -1
- data/test/lib/facets/more/test_autoarray.rb +32 -0
- data/test/lib/facets/more/test_basicobject.rb +1 -1
- data/test/lib/facets/more/test_bbcode.rb +1 -1
- data/test/lib/facets/more/test_binaryreader.rb +1 -1
- data/test/lib/facets/more/test_bitmask.rb +1 -1
- data/test/lib/facets/more/test_bytes.rb +1 -1
- data/test/lib/facets/more/test_classmethods.rb +1 -1
- data/test/lib/facets/more/test_command.rb +1 -1
- data/test/lib/facets/more/test_coroutine.rb +1 -1
- data/test/lib/facets/more/test_crypt.rb +1 -1
- data/test/lib/facets/more/test_cut.rb +198 -0
- data/test/lib/facets/more/test_dictionary.rb +1 -1
- data/test/lib/facets/more/test_elementor.rb +5 -1
- data/test/lib/facets/more/test_enumerablepass.rb +1 -1
- data/test/lib/facets/more/test_floatstring.rb +1 -1
- data/test/lib/facets/more/test_functor.rb +1 -1
- data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_infinity.rb +50 -0
- data/test/lib/facets/more/test_inheritor.rb +1 -1
- data/test/lib/facets/more/test_instance_intercept.rb +50 -0
- data/test/lib/facets/more/test_interval.rb +1 -1
- data/test/lib/facets/more/test_json.rb +1 -1
- data/test/lib/facets/more/test_lisp.rb +1 -1
- data/test/lib/facets/more/test_lisp_format.rb +1 -1
- data/test/lib/facets/more/test_lrucache.rb +1 -1
- data/test/lib/facets/more/test_mathconstants.rb +1 -1
- data/test/lib/facets/more/test_methodfilter.rb +45 -0
- data/test/lib/facets/more/test_methodprobe.rb +1 -1
- data/test/lib/facets/more/test_multipliers.rb +1 -1
- data/test/lib/facets/more/test_multiton.rb +1 -1
- data/test/lib/facets/more/test_nackclass.rb +1 -1
- data/test/lib/facets/more/test_nilcomparable.rb +1 -1
- data/test/lib/facets/more/test_opencascade.rb +24 -15
- data/test/lib/facets/more/test_openobject.rb +70 -22
- data/test/lib/facets/more/test_overload.rb +1 -1
- data/test/lib/facets/more/test_paramix.rb +1 -1
- data/test/lib/facets/more/test_pqueue.rb +1 -1
- data/test/lib/facets/more/test_predicate.rb +79 -0
- data/test/lib/facets/more/test_preinitialize.rb +1 -1
- data/test/lib/facets/more/test_promoteself.rb +1 -1
- data/test/lib/facets/more/test_recorder.rb +1 -1
- data/test/lib/facets/more/test_snapshot.rb +1 -1
- data/test/lib/facets/more/test_statichash.rb +1 -1
- data/test/lib/facets/more/test_syncarray.rb +1 -1
- data/test/lib/facets/more/test_synchash.rb +1 -1
- data/test/lib/facets/more/test_tagiterator.rb +1 -1
- data/test/lib/facets/more/test_taskable.rb +1 -1
- data/test/lib/facets/more/test_timer.rb +1 -1
- data/test/lib/facets/more/test_times.rb +1 -1
- data/test/lib/facets/more/test_tuple.rb +1 -1
- data/test/lib/facets/more/test_typecast.rb +1 -1
- data/test/lib/facets/more/test_uninheritable.rb +1 -1
- data/test/lib/facets/more/test_units.rb +1 -1
- data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_xmlhelper.rb +1 -1
- data/test/lib/facets/more/test_xoxo.rb +1 -1
- data/test/lib/facets/more/test_yamlstruct.rb +1 -1
- metadata +1147 -2081
- data/doc/api/core/classes/Array.html +0 -1356
- data/doc/api/core/classes/Binding.html +0 -538
- data/doc/api/core/classes/Class.html +0 -476
- data/doc/api/core/classes/Comparable.html +0 -231
- data/doc/api/core/classes/Config.html +0 -120
- data/doc/api/core/classes/Continuation.html +0 -168
- data/doc/api/core/classes/Date.html +0 -219
- data/doc/api/core/classes/Dir.html +0 -208
- data/doc/api/core/classes/Enumerable.html +0 -1462
- data/doc/api/core/classes/FalseClass.html +0 -115
- data/doc/api/core/classes/File.html +0 -383
- data/doc/api/core/classes/FileUtils.html +0 -468
- data/doc/api/core/classes/Float.html +0 -157
- data/doc/api/core/classes/Gem.html +0 -150
- data/doc/api/core/classes/Hash.html +0 -1627
- data/doc/api/core/classes/Integer.html +0 -353
- data/doc/api/core/classes/Kernal.html +0 -86
- data/doc/api/core/classes/Kernel.html +0 -2010
- data/doc/api/core/classes/Logger.html +0 -157
- data/doc/api/core/classes/MatchData.html +0 -195
- data/doc/api/core/classes/Module.html +0 -1812
- data/doc/api/core/classes/NackClass.html +0 -92
- data/doc/api/core/classes/NilClass.html +0 -385
- data/doc/api/core/classes/Numeric.html +0 -306
- data/doc/api/core/classes/Object.html +0 -332
- data/doc/api/core/classes/OpenStruct.html +0 -315
- data/doc/api/core/classes/Pathname.html +0 -154
- data/doc/api/core/classes/Proc.html +0 -154
- data/doc/api/core/classes/Range.html +0 -235
- data/doc/api/core/classes/Regexp.html +0 -185
- data/doc/api/core/classes/ScriptBug.html +0 -92
- data/doc/api/core/classes/String.html +0 -3250
- data/doc/api/core/classes/Symbol.html +0 -463
- data/doc/api/core/classes/Time.html +0 -307
- data/doc/api/core/classes/TrueClass.html +0 -115
- data/doc/api/core/classes/UnboundMethod.html +0 -121
- data/doc/api/core/created.rid +0 -1
- data/doc/api/core/files/COPYING.html +0 -517
- data/doc/api/core/files/README.html +0 -386
- data/doc/api/core/files/lib/facets/core/all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/at_rand_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/body_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/delete_unless_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/delete_values_at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/delete_values_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/each_with_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/first_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/foot_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/head_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/join_sentence_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/last_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/last_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/merge_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/mid_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/middle_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_fetch_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_mod_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_store_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/pick_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pos_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pot_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pull_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rand_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rand_subset_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rotate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/select_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/shuffle_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/store_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/tail_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/thru_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_hash_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/unzip_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/binding/__DIR___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/binding/__FILE___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/binding/__LINE___rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/call_stack_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/called_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/caller_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/defined_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/eval_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/binding/local_variables_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/method_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/op_fetch_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/op_store_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/self/of_caller_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/self_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding_rb.html +0 -109
- data/doc/api/core/files/lib/facets/core/class/by_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/class/cattr_accessor_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/cattr_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/cattr_reader_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/cattr_writer_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/descendents_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/remove_descendents_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/class/remove_subclasses_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/subclasses_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/to_proc_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/class/unix_path_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/at_least_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/at_most_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/comparable/cap_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/comparable/clip_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/config/datadir_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/continuation/self/create_rb.html +0 -148
- data/doc/api/core/files/lib/facets/core/date/days_in_month_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/days_of_month_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/stamp_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_date_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_s_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_time_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/dir/self/ancestor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/ascend_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/descend_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/ls_r_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/recurse_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/accumulate_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/cascade_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/collect_if_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/collect_with_counter_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/collect_with_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/commonality_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/compact_collect_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/compact_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/count_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/cross_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/each_by_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/each_combination_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_pair_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_permutation_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/each_slice_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_unique_pair_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/each_with_counter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/elementwise_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/entropy_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/enumerable/every_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/ew_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/filter_collect_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/filter_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/find_collisions_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/frequency_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/graph_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/ideal_entropy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/map_if_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/map_with_counter_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/map_with_index_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/mode_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/none_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/nonuniq_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/occur_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/one_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/op_pow_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/partition_by_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/permute_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/probability_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/project_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/self/combinations_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/self/cross_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/uniq_by_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/where_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/append_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/create_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/open_as_string_rb.html +0 -118
- data/doc/api/core/files/lib/facets/core/file/self/read_binary_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/read_list_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/file/self/rootname_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/sanitize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/split_all_rb.html +0 -101
- data/doc/api/core/files/lib/facets/core/file/self/write_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/head_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/fileutils/safe_ln_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/slice_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/split_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/fileutils/tail_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/fileutils/wc_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/whereis_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/which_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/float/approx_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/float/round_at_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/float/round_off_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/float/round_to_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/gem/self/active_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/gem/self/gempath_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/gem/self/gemspec_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/alias_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/assert_has_keys_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/assert_has_only_keys_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/collate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/delete_unless_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/each_with_index_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/hash/each_with_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/graph_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/has_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/has_only_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/inverse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/join_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/keys_to_s_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/keys_to_sym_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/op_fetch_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/op_lshift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/op_store_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/rand_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/rand_pair_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/rand_value_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/replace_each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/self/zipnew_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/shuffle_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/slice_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/stringify_keys_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/swap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/swapkey_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/symoblize_keys_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/to_ostruct_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/to_ostruct_recurse_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/hash/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/traverse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_values_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/variablize_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/weave_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/inflect_rb.html +0 -117
- data/doc/api/core/files/lib/facets/core/integer/even_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/fac_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/fact_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/factorial_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/multiple_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/odd_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/ordinal_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/times_collect_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/times_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/__DIR___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__callee___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/__class___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__get___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__method___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__self___rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/__set___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/as_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/assign_from_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/assign_with_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_files_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_glob_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/bool_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/bug_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/cache_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/call_stack_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/called_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/complete_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/constant_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/copy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/deep_copy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/demo_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/eigenclass_rb.html +0 -103
- data/doc/api/core/files/lib/facets/core/kernel/false_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/fn_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/generate_method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/get_by_id_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/here_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/in_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/instance_assign_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/instvar_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/is_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/maybe_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/metaclass_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/methods_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/nack_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/kernel/new_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/object_class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/object_hexid_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/op_esc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/own_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/p_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/pp_exception_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/quaclass_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/require_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/require_esc_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/require_facet_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/require_local_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/resc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/respond_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/returning_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/send_as_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/set_from_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/set_with_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/silence_warnings_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/silently_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/singleton_class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/singleton_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/superior_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/supermethod_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/this_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/to_bool_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/true_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/unuri_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/uri_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/val_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/warn_with_line_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/with_accessor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/with_reader_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/with_writer_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/logger/format_message_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/logger/format_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/matchdata/match_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/matchdata/matchset_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/matchdata/matchtree_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/abstract_rb.html +0 -105
- data/doc/api/core/files/lib/facets/core/module/alias_method_chain_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/alias_module_function_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/ancestor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_query_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/attr_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_setter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_tester_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/attr_validator_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/basename_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/by_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/class_extension_rb.html +0 -124
- data/doc/api/core/files/lib/facets/core/module/class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/clone_removing_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/clone_renaming_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/clone_using_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/dirname_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/equate_on_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/generate_instance_method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/include_as_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/initializer_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/instance_methods_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/integrate_rb.html +0 -104
- data/doc/api/core/files/lib/facets/core/module/is_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/memoize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/modspace_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/module/namespace_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/nesting_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/nodef_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/on_included_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redef_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/redefine_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redirect_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redirect_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/remove_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/rename_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/rename_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/revisal_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/shadow_all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/shadow_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/sort_on_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/this_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/wrap_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/wrap_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/nil_as_emptiness_rb.html +0 -116
- data/doc/api/core/files/lib/facets/core/nilclass/blank_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/empty_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/include_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/length_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/nilclass/op_cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/op_fetch_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/size_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/status_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/approx_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/ceil_multiple_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/pred_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/numeric/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct/__merge___rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/ostruct/__table___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct/__update___rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/ostruct/instance_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/op_fetch_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/op_store_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct_rb.html +0 -102
- data/doc/api/core/files/lib/facets/core/pathname/ascend_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/pathname/descend_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/proc/compose_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/proc/op_mul_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/proc/to_method_rb.html +0 -133
- data/doc/api/core/files/lib/facets/core/random_rb.html +0 -111
- data/doc/api/core/files/lib/facets/core/range/to_r_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/to_range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/umbrella_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/within_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/regexp/arity_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/regexp/to_re_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/regexp/to_regexp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/align_center_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/align_left_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/align_right_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/at_rand_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/basename_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/blank_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/bracket_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/brief_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/bytes_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/camelcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/camelize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/capitalized_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/chars_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/demodulize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/dequote_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/downcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/dresner_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/each_char_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/each_word_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/ends_with_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/first_char_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/first_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/fold_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/format_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/humanize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/indent_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/index_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/last_char_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/last_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/line_wrap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/lines_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/lowercase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/margin_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/methodize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/modulize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/mscan_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/natcmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/nchar_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/ordinal_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/pathize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/plural_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/pop_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/pot_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/pull_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/push_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/quote_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/rand_byte_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/rand_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/range_all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/range_of_line_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/regesc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/format_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/interpolate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/patterns_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/rand_letter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/random_rb.html +0 -99
- data/doc/api/core/files/lib/facets/core/string/shatter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shell_escape_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shuffle_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/similarity_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/singular_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/soundex_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/starts_with_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/tab_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/tabto_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/to_a_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_const_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_date_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/string/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_re_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_rx_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/to_time_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/unbracket_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/underscore_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/unix_crypt_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/unpack_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/unshift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/upcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/uppercase_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/whitespace_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/word_filter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/word_wrap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/words_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string_as_array_rb.html +0 -109
- data/doc/api/core/files/lib/facets/core/symbol/camelcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/camelize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/capitalize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/capitalized_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/symbol/downcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/not_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/pad_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/to_const_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/to_str_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/underscore_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/upcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/change_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/elapse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/self/days_extrema_rb.html +0 -114
- data/doc/api/core/files/lib/facets/core/time/self/stamp_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/time/stamp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/to_date_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/to_s_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/to_time_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/unboundmethod/name_rb.html +0 -92
- data/doc/api/core/fr_class_index.html +0 -81
- data/doc/api/core/fr_file_index.html +0 -521
- data/doc/api/core/fr_method_index.html +0 -559
- data/doc/api/core/index.html +0 -26
- data/doc/api/core/rdoc-style.css +0 -175
- data/doc/api/more/classes/Annotation.html +0 -258
- data/doc/api/more/classes/Array.html +0 -363
- data/doc/api/more/classes/Aspect.html +0 -159
- data/doc/api/more/classes/Aspects.html +0 -240
- data/doc/api/more/classes/Aspects/ClassMethods.html +0 -254
- data/doc/api/more/classes/Association.html +0 -289
- data/doc/api/more/classes/BBCode.html +0 -531
- data/doc/api/more/classes/BasicObject.html +0 -281
- data/doc/api/more/classes/BasicObject/Self.html +0 -143
- data/doc/api/more/classes/BinaryReader.html +0 -535
- data/doc/api/more/classes/BinaryReader/ByteOrder.html +0 -225
- data/doc/api/more/classes/BuilderObject.html +0 -248
- data/doc/api/more/classes/Class.html +0 -200
- data/doc/api/more/classes/Client.html +0 -1251
- data/doc/api/more/classes/Cloneable.html +0 -133
- data/doc/api/more/classes/Console.html +0 -105
- data/doc/api/more/classes/Console/ANSICode.html +0 -488
- data/doc/api/more/classes/Console/Command.html +0 -286
- data/doc/api/more/classes/Console/ProgressBar.html +0 -640
- data/doc/api/more/classes/Coroutine.html +0 -284
- data/doc/api/more/classes/Crypt.html +0 -270
- data/doc/api/more/classes/DebugSocket.html +0 -242
- data/doc/api/more/classes/Dictionary.html +0 -974
- data/doc/api/more/classes/Downloader.html +0 -515
- data/doc/api/more/classes/Downloader/Checksum.html +0 -96
- data/doc/api/more/classes/Downloader/Mirror.html +0 -134
- data/doc/api/more/classes/Elementor.html +0 -202
- data/doc/api/more/classes/Enumerable.html +0 -86
- data/doc/api/more/classes/EnumerablePass.html +0 -217
- data/doc/api/more/classes/Expirable.html +0 -197
- data/doc/api/more/classes/FalseClass.html +0 -119
- data/doc/api/more/classes/FileList.html +0 -971
- data/doc/api/more/classes/Float.html +0 -141
- data/doc/api/more/classes/FloatString.html +0 -413
- data/doc/api/more/classes/Functor.html +0 -224
- data/doc/api/more/classes/HTMLBuilder.html +0 -132
- data/doc/api/more/classes/HTMLHelper.html +0 -189
- data/doc/api/more/classes/HTTP.html +0 -154
- data/doc/api/more/classes/HTTP/BadResponseError.html +0 -94
- data/doc/api/more/classes/HTTP/Error.html +0 -96
- data/doc/api/more/classes/HTTP/Message.html +0 -633
- data/doc/api/more/classes/HTTP/Message/Body.html +0 -299
- data/doc/api/more/classes/HTTP/Message/Headers.html +0 -641
- data/doc/api/more/classes/HTTP/Status.html +0 -148
- data/doc/api/more/classes/HTTPAccess.html +0 -115
- data/doc/api/more/classes/Hash.html +0 -257
- data/doc/api/more/classes/HashBuilder.html +0 -216
- data/doc/api/more/classes/Heap.html +0 -535
- data/doc/api/more/classes/Heap/EmptyHeapException.html +0 -92
- data/doc/api/more/classes/Heap/Max.html +0 -133
- data/doc/api/more/classes/Heap/Min.html +0 -133
- data/doc/api/more/classes/IORedirect.html +0 -224
- data/doc/api/more/classes/Integer.html +0 -299
- data/doc/api/more/classes/Interval.html +0 -853
- data/doc/api/more/classes/InvalidNackError.html +0 -117
- data/doc/api/more/classes/JSON.html +0 -410
- data/doc/api/more/classes/JSON/Parser.html +0 -374
- data/doc/api/more/classes/JSON/State.html +0 -280
- data/doc/api/more/classes/Kernel.html +0 -400
- data/doc/api/more/classes/LRUCache.html +0 -461
- data/doc/api/more/classes/LRUCache/Item.html +0 -114
- data/doc/api/more/classes/LRUCache/Sentinel.html +0 -102
- data/doc/api/more/classes/Lazy.html +0 -96
- data/doc/api/more/classes/Lazy/Future.html +0 -100
- data/doc/api/more/classes/Lazy/Promise.html +0 -114
- data/doc/api/more/classes/Lazy/PromiseSafe.html +0 -99
- data/doc/api/more/classes/Lisp.html +0 -846
- data/doc/api/more/classes/Lisp/DottedPair.html +0 -289
- data/doc/api/more/classes/Lisp/Format.html +0 -147
- data/doc/api/more/classes/Math.html +0 -110
- data/doc/api/more/classes/Math/Constants.html +0 -691
- data/doc/api/more/classes/Math/Constants/CGS.html +0 -584
- data/doc/api/more/classes/Method.html +0 -170
- data/doc/api/more/classes/Method/Probe.html +0 -267
- data/doc/api/more/classes/Mock.html +0 -276
- data/doc/api/more/classes/Module.html +0 -599
- data/doc/api/more/classes/Multiton.html +0 -256
- data/doc/api/more/classes/NackClass.html +0 -245
- data/doc/api/more/classes/NilClass.html +0 -238
- data/doc/api/more/classes/NullClass.html +0 -202
- data/doc/api/more/classes/Numeric.html +0 -1104
- data/doc/api/more/classes/ORMSupport.html +0 -357
- data/doc/api/more/classes/Object.html +0 -328
- data/doc/api/more/classes/OpenCascade.html +0 -230
- data/doc/api/more/classes/OpenObject.html +0 -552
- data/doc/api/more/classes/PQueue.html +0 -471
- data/doc/api/more/classes/PathList.html +0 -162
- data/doc/api/more/classes/PathList/Finder.html +0 -137
- data/doc/api/more/classes/Pool.html +0 -207
- data/doc/api/more/classes/Proc.html +0 -140
- data/doc/api/more/classes/PromoteSelf.html +0 -138
- data/doc/api/more/classes/Quaternion.html +0 -1497
- data/doc/api/more/classes/REXMLBuilder.html +0 -357
- data/doc/api/more/classes/REXMLBuilder/REXMLUtil.html +0 -396
- data/doc/api/more/classes/Recorder.html +0 -208
- data/doc/api/more/classes/Reference.html +0 -201
- data/doc/api/more/classes/RubyOneLiners.html +0 -139
- data/doc/api/more/classes/RubyTals.html +0 -316
- data/doc/api/more/classes/SSLSocketWrap.html +0 -410
- data/doc/api/more/classes/Semaphore.html +0 -264
- data/doc/api/more/classes/SimpleStringIO.html +0 -139
- data/doc/api/more/classes/Snapshot.html +0 -191
- data/doc/api/more/classes/StateMachine.html +0 -248
- data/doc/api/more/classes/StateParser.html +0 -276
- data/doc/api/more/classes/StateParser/Constants.html +0 -109
- data/doc/api/more/classes/StateParser/Marker.html +0 -269
- data/doc/api/more/classes/StateParser/State.html +0 -448
- data/doc/api/more/classes/StaticHash.html +0 -144
- data/doc/api/more/classes/String.html +0 -300
- data/doc/api/more/classes/Struct.html +0 -134
- data/doc/api/more/classes/Symbol.html +0 -118
- data/doc/api/more/classes/SyncArray.html +0 -131
- data/doc/api/more/classes/SyncHash.html +0 -135
- data/doc/api/more/classes/SyncHash/Delegator.html +0 -213
- data/doc/api/more/classes/SyncHash/Inheritor.html +0 -213
- data/doc/api/more/classes/System.html +0 -1055
- data/doc/api/more/classes/TSort.html +0 -123
- data/doc/api/more/classes/TagIterator.html +0 -706
- data/doc/api/more/classes/Task.html +0 -237
- data/doc/api/more/classes/Task/Graph.html +0 -165
- data/doc/api/more/classes/Taskable.html +0 -300
- data/doc/api/more/classes/Time.html +0 -746
- data/doc/api/more/classes/Timer.html +0 -471
- data/doc/api/more/classes/Timer/Dummy.html +0 -141
- data/doc/api/more/classes/TracePoint.html +0 -456
- data/doc/api/more/classes/TrueClass.html +0 -118
- data/doc/api/more/classes/Tuple.html +0 -907
- data/doc/api/more/classes/TypeCastException.html +0 -163
- data/doc/api/more/classes/Uninheritable.html +0 -130
- data/doc/api/more/classes/Units.html +0 -191
- data/doc/api/more/classes/Units/Config.html +0 -120
- data/doc/api/more/classes/Units/Converter.html +0 -808
- data/doc/api/more/classes/Units/Converter/ExchangeRate.html +0 -155
- data/doc/api/more/classes/Units/Converter/ExchangeRate/CachedXMethods.html +0 -143
- data/doc/api/more/classes/Units/Converter/ExchangeRate/XMethods.html +0 -197
- data/doc/api/more/classes/Units/Unit.html +0 -434
- data/doc/api/more/classes/Units/Value.html +0 -331
- data/doc/api/more/classes/ValueHolder.html +0 -167
- data/doc/api/more/classes/Web.html +0 -103
- data/doc/api/more/classes/Web/Cookie.html +0 -560
- data/doc/api/more/classes/Web/CookieManager.html +0 -567
- data/doc/api/more/classes/Web/CookieManager/Error.html +0 -96
- data/doc/api/more/classes/Web/CookieManager/ErrorOverrideOK.html +0 -94
- data/doc/api/more/classes/Web/CookieManager/NoDotError.html +0 -94
- data/doc/api/more/classes/Web/CookieManager/SpecialError.html +0 -94
- data/doc/api/more/classes/Web/CookieUtils.html +0 -179
- data/doc/api/more/classes/XMLBuilder.html +0 -132
- data/doc/api/more/classes/XMLHelper.html +0 -428
- data/doc/api/more/classes/XOXO.html +0 -251
- data/doc/api/more/classes/YAMLStruct.html +0 -166
- data/doc/api/more/created.rid +0 -1
- data/doc/api/more/files/COPYING.html +0 -517
- data/doc/api/more/files/README.html +0 -389
- data/doc/api/more/files/lib/facets/more/annattr_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/annotation_rb.html +0 -117
- data/doc/api/more/files/lib/facets/more/ansicode_rb.html +0 -128
- data/doc/api/more/files/lib/facets/more/aspects_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/association_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/basicobject_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/bbcode_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/binaryreader_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/bitmask_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/blankslate_rb.html +0 -113
- data/doc/api/more/files/lib/facets/more/builderobject_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/bytes_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/classmethods_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/cloneable_rb.html +0 -132
- data/doc/api/more/files/lib/facets/more/command_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/cookie_rb.html +0 -136
- data/doc/api/more/files/lib/facets/more/coroutine_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/crypt_rb.html +0 -146
- data/doc/api/more/files/lib/facets/more/dictionary_rb.html +0 -123
- data/doc/api/more/files/lib/facets/more/downloader_rb.html +0 -124
- data/doc/api/more/files/lib/facets/more/elementor_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/enumerablepass_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/expirable_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/filelist_rb.html +0 -128
- data/doc/api/more/files/lib/facets/more/floatstring_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/functor_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/hashbuilder_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/heap_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/htmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/htmlhelper_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/http_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/httpaccess_rb.html +0 -137
- data/doc/api/more/files/lib/facets/more/inheritor_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/interval_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/ioredirect_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/json_rb.html +0 -141
- data/doc/api/more/files/lib/facets/more/lazy_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/lisp_format_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/lisp_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/lrucache_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/mathconstants_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/methodprobe_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/mock_rb.html +0 -208
- data/doc/api/more/files/lib/facets/more/multipliers_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/multiton_rb.html +0 -114
- data/doc/api/more/files/lib/facets/more/nackclass_rb.html +0 -151
- data/doc/api/more/files/lib/facets/more/nilcomparable_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/nullclass_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/one_rb.html +0 -158
- data/doc/api/more/files/lib/facets/more/opencascade_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/openobject_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/orderedhash_rb.html +0 -113
- data/doc/api/more/files/lib/facets/more/ormsupport_rb.html +0 -125
- data/doc/api/more/files/lib/facets/more/overload_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/paramix_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/pathlist_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/pool_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/pqueue_rb.html +0 -122
- data/doc/api/more/files/lib/facets/more/preinitialize_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/progressbar_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/promoteself_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/quaternion_rb.html +0 -150
- data/doc/api/more/files/lib/facets/more/recorder_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/reference_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/rexmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/rtals_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/semaphore_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/snapshot_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/stateparser_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/statichash_rb.html +0 -133
- data/doc/api/more/files/lib/facets/more/syncarray_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/synchash_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/system_rb.html +0 -123
- data/doc/api/more/files/lib/facets/more/tagiterator_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/taskable_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/timer_rb.html +0 -127
- data/doc/api/more/files/lib/facets/more/times_rb.html +0 -127
- data/doc/api/more/files/lib/facets/more/tracepoint_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/tuple_rb.html +0 -122
- data/doc/api/more/files/lib/facets/more/typecast_rb.html +0 -133
- data/doc/api/more/files/lib/facets/more/uninheritable_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/units_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/xmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/xmlhelper_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/xoxo_rb.html +0 -125
- data/doc/api/more/files/lib/facets/more/yamlstruct_rb.html +0 -123
- data/doc/api/more/fr_class_index.html +0 -196
- data/doc/api/more/fr_file_index.html +0 -133
- data/doc/api/more/fr_method_index.html +0 -1284
- data/doc/api/more/index.html +0 -26
- data/doc/api/more/rdoc-style.css +0 -175
- data/doc/web/documentation.html +0 -174
- data/doc/web/images/abc.png +0 -0
- data/doc/web/images/abc1.png +0 -0
- data/doc/web/images/apple_core.jpg +0 -0
- data/doc/web/images/apples3.jpg +0 -0
- data/doc/web/images/core.jpg +0 -0
- data/doc/web/images/favicon.ico +0 -0
- data/doc/web/images/gray.jpg +0 -0
- data/doc/web/images/ruby-lg.png +0 -0
- data/doc/web/images/ruby.gif +0 -0
- data/doc/web/images/three_apples.jpg +0 -0
- data/doc/web/images/yellow_fade.jpg +0 -0
- data/doc/web/images/yellow_fade2.jpg +0 -0
- data/doc/web/index.html +0 -224
- data/doc/web/style.css +0 -153
- data/lib/facet/blankslate.rb +0 -1
- data/lib/facet/hash/symoblize_keys.rb +0 -1
- data/lib/facet/kernel/generate_method_name.rb +0 -1
- data/lib/facet/module/generate_instance_method_name.rb +0 -1
- data/lib/facets/core/hash/symoblize_keys.rb +0 -2
- data/lib/facets/core/kernel/generate_method_name.rb +0 -39
- data/lib/facets/core/module/generate_instance_method_name.rb +0 -47
- data/lib/facets/more/blankslate.rb +0 -7
- data/proj/calibre/ProjectInfo.annotation +0 -46
- data/proj/calibre/ProjectInfo.ansicode +0 -33
- data/proj/calibre/ProjectInfo.asociation +0 -34
- data/proj/calibre/ProjectInfo.basicobject +0 -36
- data/proj/calibre/ProjectInfo.bbcode +0 -34
- data/proj/calibre/ProjectInfo.binaryreader +0 -35
- data/proj/calibre/ProjectInfo.bitmask +0 -33
- data/proj/calibre/ProjectInfo.classinherit +0 -36
- data/proj/calibre/ProjectInfo.classmethods +0 -36
- data/proj/calibre/ProjectInfo.cloneable +0 -33
- data/proj/calibre/ProjectInfo.consoleapp +0 -35
- data/proj/calibre/ProjectInfo.coroutine +0 -37
- data/proj/calibre/ProjectInfo.crypt +0 -33
- data/proj/calibre/ProjectInfo.dictionary +0 -40
- data/proj/calibre/ProjectInfo.downloader +0 -39
- data/proj/calibre/ProjectInfo.enumerablepass +0 -35
- data/proj/calibre/ProjectInfo.expirable +0 -37
- data/proj/calibre/ProjectInfo.floatstring +0 -35
- data/proj/calibre/ProjectInfo.functor +0 -40
- data/proj/calibre/ProjectInfo.heap +0 -33
- data/proj/calibre/ProjectInfo.inheritor +0 -36
- data/proj/calibre/ProjectInfo.interval +0 -36
- data/proj/calibre/ProjectInfo.lisp +0 -38
- data/proj/calibre/ProjectInfo.lrucache +0 -34
- data/proj/calibre/ProjectInfo.mathconstants +0 -41
- data/proj/calibre/ProjectInfo.methodprobe +0 -38
- data/proj/calibre/ProjectInfo.mock +0 -34
- data/proj/calibre/ProjectInfo.multiton +0 -36
- data/proj/calibre/ProjectInfo.nackclass +0 -33
- data/proj/calibre/ProjectInfo.nilcomparable +0 -35
- data/proj/calibre/ProjectInfo.nullclass +0 -35
- data/proj/calibre/ProjectInfo.one +0 -37
- data/proj/calibre/ProjectInfo.openobject +0 -39
- data/proj/calibre/ProjectInfo.paramix +0 -38
- data/proj/calibre/ProjectInfo.pool +0 -33
- data/proj/calibre/ProjectInfo.progressbar +0 -37
- data/proj/calibre/ProjectInfo.reference +0 -36
- data/proj/calibre/ProjectInfo.semaphore +0 -36
- data/proj/calibre/ProjectInfo.stateparser +0 -39
- data/proj/calibre/ProjectInfo.statichash +0 -33
- data/proj/calibre/ProjectInfo.system +0 -34
- data/proj/calibre/ProjectInfo.tagiterator +0 -36
- data/proj/calibre/ProjectInfo.timer +0 -35
- data/proj/calibre/ProjectInfo.tracepoint +0 -37
- data/proj/calibre/ProjectInfo.tuple +0 -36
- data/proj/calibre/ProjectInfo.uniheritable +0 -34
- data/proj/calibre/ProjectInfo.units +0 -34
- data/proj/calibre/ProjectInfo.yamlstruct +0 -34
- data/proj/info +0 -117
- data/proj/metadata +0 -36
- data/proj/tasks/calibre.rb +0 -15
- data/snip/ProjectInfo +0 -115
- data/snip/README +0 -13
- data/snip/TODO +0 -73
- data/snip/autorequire.rb +0 -83
- data/snip/core/array/at_rand.rb +0 -95
- data/snip/core/array/each_slice.rb +0 -23
- data/snip/core/array/pick_values.rb +0 -32
- data/snip/core/array/rand_indexes.rb +0 -33
- data/snip/core/binding/class.rb +0 -11
- data/snip/core/binding/delegate-binding.rb +0 -19
- data/snip/core/binding/delegate.rb +0 -15
- data/snip/core/binding/proc.rb +0 -6
- data/snip/core/class/to_module.rb +0 -3
- data/snip/core/enumerable/op_fetch.rb +0 -30
- data/snip/core/fileutils/nl_convert.rb +0 -133
- data/snip/core/io/expect.rb +0 -127
- data/snip/core/kernel/__clone__.rb +0 -4
- data/snip/core/kernel/__dup__.rb +0 -4
- data/snip/core/kernel/call_line.rb +0 -15
- data/snip/core/kernel/does.rb +0 -7
- data/snip/core/kernel/message.rb +0 -6
- data/snip/core/kernel/query.rb +0 -15
- data/snip/core/kernel/taint.rb +0 -10
- data/snip/core/logger/clean_logger.rb +0 -10
- data/snip/core/module/attr-old.rb +0 -308
- data/snip/core/module/attr.rb +0 -98
- data/snip/core/module/attr_xxx.rb +0 -22
- data/snip/core/module/by_regexp.rb +0 -21
- data/snip/core/module/cast.rb +0 -64
- data/snip/core/module/class_attribute_accessors.rb +0 -57
- data/snip/core/module/inherit.rb +0 -99
- data/snip/core/module/inherit0.rb +0 -59
- data/snip/core/module/let.rb +0 -51
- data/snip/core/module/meta_attr.rb +0 -60
- data/snip/core/module/module_attribute_accessors.rb +0 -57
- data/snip/core/module/permissions.rb +0 -32
- data/snip/core/module/preserved.rb +0 -108
- data/snip/core/module/sattr_accessor.rb +0 -1
- data/snip/core/module/sattr_reader.rb +0 -1
- data/snip/core/module/sattr_setter.rb +0 -1
- data/snip/core/module/sattr_tester.rb +0 -1
- data/snip/core/module/sattr_writer.rb +0 -1
- data/snip/core/module/tc_attr.rb +0 -107
- data/snip/core/module/to_module.rb +0 -37
- data/snip/core/module/version.rb +0 -23
- data/snip/core/string/frequency.rb +0 -40
- data/snip/core/string/op_add.rb +0 -24
- data/snip/core/string/op_div.rb +0 -15
- data/snip/core/string/pred.rb +0 -217
- data/snip/core/string/probability.rb +0 -35
- data/snip/core/string/to_arr.rb +0 -57
- data/snip/core/string/to_ary.rb +0 -12
- data/snip/core/string/word_wrap.rb +0 -62
- data/snip/more/actionplan.rb +0 -21
- data/snip/more/autoarray.rb +0 -29
- data/snip/more/cache.rb +0 -189
- data/snip/more/capsule2.rb +0 -152
- data/snip/more/class_inheritable_attributes.rb +0 -120
- data/snip/more/classinherit.rb +0 -198
- data/snip/more/clean.rb +0 -35
- data/snip/more/codepack.rb +0 -64
- data/snip/more/commandrunner.rb +0 -101
- data/snip/more/conditionals.rb +0 -106
- data/snip/more/contracts.rb +0 -37
- data/snip/more/daemon.rb +0 -70
- data/snip/more/datetime.rb +0 -42
- data/snip/more/detach.rb +0 -423
- data/snip/more/enumtype.rb +0 -115
- data/snip/more/fixnum_const.rb +0 -55
- data/snip/more/function.rb +0 -278
- data/snip/more/hookse.rb +0 -107
- data/snip/more/indexable.rb +0 -85
- data/snip/more/infinity.rb +0 -123
- data/snip/more/ioreactor.rb +0 -671
- data/snip/more/knowself.rb +0 -42
- data/snip/more/logger_sing.rb +0 -207
- data/snip/more/must.rb +0 -37
- data/snip/more/openproxy.rb +0 -245
- data/snip/more/ostructable.rb +0 -212
- data/snip/more/pairhash.rb +0 -55
- data/snip/more/pathname.rb +0 -1309
- data/snip/more/prereq.rb +0 -36
- data/snip/more/print_exception.rb +0 -35
- data/snip/more/rand.rb +0 -412
- data/snip/more/range.rb +0 -383
- data/snip/more/sanitize.rb +0 -48
- data/snip/more/service.rb +0 -266
- data/snip/more/superstruct.rb +0 -735
- data/snip/more/tag.rb +0 -27
- data/snip/more/testfacility.rb +0 -80
- data/snip/more/timer.rb +0 -164
- data/snip/more/toplevel.rb +0 -76
- data/snip/more/type.rb +0 -232
- data/snip/more/vars.rb +0 -94
- data/snip/more/version.rb +0 -245
- data/snip/more/world.rb +0 -53
- data/snip/reference/sys.rb +0 -186
- data/snip/reference/utils.rb +0 -518
- data/test/lib/facets/core/kernel/test_generate_method_name.rb +0 -26
- data/test/lib/facets/core/module/test_generate_instance_method_name.rb +0 -33
@@ -1,219 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Class: Date</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Class</span><br />Date</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/date/to_date_rb.html">lib/facets/core/date/to_date.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/date/days_in_month_rb.html">lib/facets/core/date/days_in_month.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/date/to_s_rb.html">lib/facets/core/date/to_s.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/date/stamp_rb.html">lib/facets/core/date/stamp.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/date/to_time_rb.html">lib/facets/core/date/to_time.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/date/days_of_month_rb.html">lib/facets/core/date/days_of_month.rb</a>
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
<tr>
|
69
|
-
<td>Parent:</td>
|
70
|
-
<td>
|
71
|
-
<a href="Object.html">
|
72
|
-
Object
|
73
|
-
</a>
|
74
|
-
</td>
|
75
|
-
</tr>
|
76
|
-
</table>
|
77
|
-
</td>
|
78
|
-
</tr>
|
79
|
-
</table>
|
80
|
-
<!-- banner header -->
|
81
|
-
|
82
|
-
<div id="bodyContent">
|
83
|
-
<div id="content">
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<div class="sectiontitle">Methods</div>
|
89
|
-
<ul>
|
90
|
-
<li><a href="#M000234">days_in_month</a></li>
|
91
|
-
<li><a href="#M000237">days_of_month</a></li>
|
92
|
-
<li><a href="#M000235">stamp</a></li>
|
93
|
-
<li><a href="#M000233">to_date</a></li>
|
94
|
-
<li><a href="#M000236">to_time</a></li>
|
95
|
-
</ul>
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<div class="sectiontitle">Public Instance methods</div>
|
103
|
-
<div class="method">
|
104
|
-
<div class="title">
|
105
|
-
<a name="M000234"></a><b>days_in_month</b>()
|
106
|
-
</div>
|
107
|
-
<div class="description">
|
108
|
-
<p>
|
109
|
-
Returns the number of days in the date’s month.
|
110
|
-
</p>
|
111
|
-
<pre>
|
112
|
-
Date.new(2004,2).days_in_month #=> 28
|
113
|
-
</pre>
|
114
|
-
</div>
|
115
|
-
<div class="sourcecode">
|
116
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000234_source')" id="l_M000234_source">show source</a> ]</p>
|
117
|
-
<div id="M000234_source" class="dyn-source">
|
118
|
-
<pre>
|
119
|
-
<span class="ruby-comment cmt"># File lib/facets/core/date/days_in_month.rb, line 12</span>
|
120
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days_in_month</span>
|
121
|
-
<span class="ruby-constant">Date</span>.<span class="ruby-identifier">civil</span>(<span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-value">-1</span>).<span class="ruby-identifier">day</span>
|
122
|
-
<span class="ruby-keyword kw">end</span>
|
123
|
-
</pre>
|
124
|
-
</div>
|
125
|
-
</div>
|
126
|
-
</div>
|
127
|
-
<div class="method">
|
128
|
-
<div class="title">
|
129
|
-
<a name="M000237"></a><b>days_of_month</b>()
|
130
|
-
</div>
|
131
|
-
<div class="sourcecode">
|
132
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000237_source')" id="l_M000237_source">show source</a> ]</p>
|
133
|
-
<div id="M000237_source" class="dyn-source">
|
134
|
-
<pre>
|
135
|
-
<span class="ruby-comment cmt"># File lib/facets/core/date/days_of_month.rb, line 5</span>
|
136
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">days_of_month</span>
|
137
|
-
(<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">days_in_month</span>).<span class="ruby-identifier">to_a</span>
|
138
|
-
<span class="ruby-keyword kw">end</span>
|
139
|
-
</pre>
|
140
|
-
</div>
|
141
|
-
</div>
|
142
|
-
</div>
|
143
|
-
<div class="method">
|
144
|
-
<div class="title">
|
145
|
-
<a name="M000235"></a><b>stamp</b>(format = nil)
|
146
|
-
</div>
|
147
|
-
<div class="description">
|
148
|
-
<p>
|
149
|
-
An enhanched to_s method that cane take an optional format flag of :short
|
150
|
-
or :long.
|
151
|
-
</p>
|
152
|
-
</div>
|
153
|
-
<div class="sourcecode">
|
154
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000235_source')" id="l_M000235_source">show source</a> ]</p>
|
155
|
-
<div id="M000235_source" class="dyn-source">
|
156
|
-
<pre>
|
157
|
-
<span class="ruby-comment cmt"># File lib/facets/core/date/stamp.rb, line 8</span>
|
158
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stamp</span>(<span class="ruby-identifier">format</span> = <span class="ruby-keyword kw">nil</span>)
|
159
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">format</span>
|
160
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:short</span>
|
161
|
-
<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%e %b"</span>).<span class="ruby-identifier">strip</span>
|
162
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:long</span>
|
163
|
-
<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%B %e, %Y"</span>).<span class="ruby-identifier">strip</span>
|
164
|
-
<span class="ruby-keyword kw">else</span>
|
165
|
-
<span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%Y-%m-%d"</span>) <span class="ruby-comment cmt"># standard to_s</span>
|
166
|
-
<span class="ruby-keyword kw">end</span>
|
167
|
-
<span class="ruby-keyword kw">end</span>
|
168
|
-
</pre>
|
169
|
-
</div>
|
170
|
-
</div>
|
171
|
-
</div>
|
172
|
-
<div class="method">
|
173
|
-
<div class="title">
|
174
|
-
<a name="M000233"></a><b>to_date</b>()
|
175
|
-
</div>
|
176
|
-
<div class="description">
|
177
|
-
<p>
|
178
|
-
To be able to keep Dates and Times interchangeable on conversions.
|
179
|
-
</p>
|
180
|
-
</div>
|
181
|
-
<div class="sourcecode">
|
182
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000233_source')" id="l_M000233_source">show source</a> ]</p>
|
183
|
-
<div id="M000233_source" class="dyn-source">
|
184
|
-
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File lib/facets/core/date/to_date.rb, line 7</span>
|
186
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_date</span>
|
187
|
-
<span class="ruby-keyword kw">self</span>
|
188
|
-
<span class="ruby-keyword kw">end</span>
|
189
|
-
</pre>
|
190
|
-
</div>
|
191
|
-
</div>
|
192
|
-
</div>
|
193
|
-
<div class="method">
|
194
|
-
<div class="title">
|
195
|
-
<a name="M000236"></a><b>to_time</b>(form = :local)
|
196
|
-
</div>
|
197
|
-
<div class="description">
|
198
|
-
<p>
|
199
|
-
Convert <a href="Date.html">Date</a> to <a href="Time.html">Time</a>.
|
200
|
-
</p>
|
201
|
-
</div>
|
202
|
-
<div class="sourcecode">
|
203
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000236_source')" id="l_M000236_source">show source</a> ]</p>
|
204
|
-
<div id="M000236_source" class="dyn-source">
|
205
|
-
<pre>
|
206
|
-
<span class="ruby-comment cmt"># File lib/facets/core/date/to_time.rb, line 7</span>
|
207
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_time</span>(<span class="ruby-identifier">form</span> = <span class="ruby-identifier">:local</span>)
|
208
|
-
<span class="ruby-operator">::</span><span class="ruby-constant">Time</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">form</span>, <span class="ruby-identifier">year</span>, <span class="ruby-identifier">month</span>, <span class="ruby-identifier">day</span>)
|
209
|
-
<span class="ruby-keyword kw">end</span>
|
210
|
-
</pre>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
</div>
|
214
|
-
</div>
|
215
|
-
|
216
|
-
</div>
|
217
|
-
|
218
|
-
</body>
|
219
|
-
</html>
|
@@ -1,208 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Class: Dir</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Class</span><br />Dir</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/dir/self/ls_r_rb.html">lib/facets/core/dir/self/ls_r.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/dir/self/ancestor_rb.html">lib/facets/core/dir/self/ancestor.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/dir/self/ascend_rb.html">lib/facets/core/dir/self/ascend.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/dir/self/descend_rb.html">lib/facets/core/dir/self/descend.rb</a>
|
64
|
-
</td>
|
65
|
-
</tr>
|
66
|
-
<tr>
|
67
|
-
<td>Parent:</td>
|
68
|
-
<td>
|
69
|
-
<a href="Object.html">
|
70
|
-
Object
|
71
|
-
</a>
|
72
|
-
</td>
|
73
|
-
</tr>
|
74
|
-
</table>
|
75
|
-
</td>
|
76
|
-
</tr>
|
77
|
-
</table>
|
78
|
-
<!-- banner header -->
|
79
|
-
|
80
|
-
<div id="bodyContent">
|
81
|
-
<div id="content">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
<div class="sectiontitle">Methods</div>
|
87
|
-
<ul>
|
88
|
-
<li><a href="#M000044">ancestor?</a></li>
|
89
|
-
<li><a href="#M000045">ascend</a></li>
|
90
|
-
<li><a href="#M000046">descend</a></li>
|
91
|
-
<li><a href="#M000043">ls_r</a></li>
|
92
|
-
</ul>
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<div class="sectiontitle">Public Class methods</div>
|
100
|
-
<div class="method">
|
101
|
-
<div class="title">
|
102
|
-
<a name="M000044"></a><b>ancestor?</b>(parent_path, child_path)
|
103
|
-
</div>
|
104
|
-
<div class="description">
|
105
|
-
<p>
|
106
|
-
Is a path parental to another?
|
107
|
-
</p>
|
108
|
-
</div>
|
109
|
-
<div class="sourcecode">
|
110
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
|
111
|
-
<div id="M000044_source" class="dyn-source">
|
112
|
-
<pre>
|
113
|
-
<span class="ruby-comment cmt"># File lib/facets/core/dir/self/ancestor.rb, line 8</span>
|
114
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestor?</span>(<span class="ruby-identifier">parent_path</span>, <span class="ruby-identifier">child_path</span>)
|
115
|
-
<span class="ruby-node">%r|^#{Regexp.escape(parent_path)}|</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">child_path</span>
|
116
|
-
<span class="ruby-keyword kw">end</span>
|
117
|
-
</pre>
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
<div class="method">
|
122
|
-
<div class="title">
|
123
|
-
<a name="M000045"></a><b>ascend</b>( dir, inclusive=true, &blk)
|
124
|
-
</div>
|
125
|
-
<div class="description">
|
126
|
-
<p>
|
127
|
-
Ascend a directory path.
|
128
|
-
</p>
|
129
|
-
</div>
|
130
|
-
<div class="sourcecode">
|
131
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
|
132
|
-
<div id="M000045_source" class="dyn-source">
|
133
|
-
<pre>
|
134
|
-
<span class="ruby-comment cmt"># File lib/facets/core/dir/self/ascend.rb, line 6</span>
|
135
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ascend</span>( <span class="ruby-identifier">dir</span>, <span class="ruby-identifier">inclusive</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
136
|
-
<span class="ruby-identifier">dir</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">dup</span>
|
137
|
-
<span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-identifier">dir</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">inclusive</span>
|
138
|
-
<span class="ruby-identifier">ri</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">'/'</span>)
|
139
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-identifier">ri</span>
|
140
|
-
<span class="ruby-identifier">dir</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ri</span>)
|
141
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dir</span> <span class="ruby-operator">==</span> <span class="ruby-value str">""</span>
|
142
|
-
<span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-value str">'/'</span> ) ; <span class="ruby-keyword kw">break</span>
|
143
|
-
<span class="ruby-keyword kw">end</span>
|
144
|
-
<span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>( <span class="ruby-identifier">dir</span> )
|
145
|
-
<span class="ruby-identifier">ri</span> = <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">'/'</span>)
|
146
|
-
<span class="ruby-keyword kw">end</span>
|
147
|
-
<span class="ruby-keyword kw">end</span>
|
148
|
-
</pre>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
<div class="method">
|
153
|
-
<div class="title">
|
154
|
-
<a name="M000046"></a><b>descend</b>( path ) {|| ...}
|
155
|
-
</div>
|
156
|
-
<div class="sourcecode">
|
157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
|
158
|
-
<div id="M000046_source" class="dyn-source">
|
159
|
-
<pre>
|
160
|
-
<span class="ruby-comment cmt"># File lib/facets/core/dir/self/descend.rb, line 4</span>
|
161
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">descend</span>( <span class="ruby-identifier">path</span> ) <span class="ruby-comment cmt">#:yield:</span>
|
162
|
-
<span class="ruby-identifier">paths</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>)
|
163
|
-
<span class="ruby-identifier">paths</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
164
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">paths</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">n</span>] )
|
165
|
-
<span class="ruby-keyword kw">end</span>
|
166
|
-
<span class="ruby-keyword kw">end</span>
|
167
|
-
</pre>
|
168
|
-
</div>
|
169
|
-
</div>
|
170
|
-
</div>
|
171
|
-
<div class="method">
|
172
|
-
<div class="title">
|
173
|
-
<a name="M000043"></a><b>ls_r</b>(path='.', &block)
|
174
|
-
</div>
|
175
|
-
<div class="description">
|
176
|
-
<p>
|
177
|
-
Recursively scan a directory and pass each file to the given block.
|
178
|
-
</p>
|
179
|
-
</div>
|
180
|
-
<div class="sourcecode">
|
181
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
|
182
|
-
<div id="M000043_source" class="dyn-source">
|
183
|
-
<pre>
|
184
|
-
<span class="ruby-comment cmt"># File lib/facets/core/dir/self/ls_r.rb, line 8</span>
|
185
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ls_r</span>(<span class="ruby-identifier">path</span>=<span class="ruby-value str">'.'</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
186
|
-
<span class="ruby-identifier">list</span> = []
|
187
|
-
<span class="ruby-identifier">stoplist</span> = [<span class="ruby-value str">'.'</span>, <span class="ruby-value str">'..'</span>]
|
188
|
-
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">foreach</span>(<span class="ruby-identifier">path</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
189
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stoplist</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">f</span>)
|
190
|
-
<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">path</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">f</span>
|
191
|
-
<span class="ruby-identifier">list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">filename</span>
|
192
|
-
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
193
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-constant">FileTest</span>.<span class="ruby-identifier">symlink?</span>(<span class="ruby-identifier">filename</span>)
|
194
|
-
<span class="ruby-identifier">list</span>.<span class="ruby-identifier">concat</span>( <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">recurse</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) )
|
195
|
-
<span class="ruby-keyword kw">end</span>
|
196
|
-
<span class="ruby-keyword kw">end</span>
|
197
|
-
<span class="ruby-identifier">list</span>
|
198
|
-
<span class="ruby-keyword kw">end</span>
|
199
|
-
</pre>
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
|
205
|
-
</div>
|
206
|
-
|
207
|
-
</body>
|
208
|
-
</html>
|
@@ -1,1462 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
<html>
|
6
|
-
<head>
|
7
|
-
<title>Module: Enumerable</title>
|
8
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
10
|
-
|
11
|
-
<script language="JavaScript" type="text/javascript">
|
12
|
-
// <![CDATA[
|
13
|
-
|
14
|
-
function toggleSource( id )
|
15
|
-
{
|
16
|
-
var elem
|
17
|
-
var link
|
18
|
-
|
19
|
-
if( document.getElementById )
|
20
|
-
{
|
21
|
-
elem = document.getElementById( id )
|
22
|
-
link = document.getElementById( "l_" + id )
|
23
|
-
}
|
24
|
-
else if ( document.all )
|
25
|
-
{
|
26
|
-
elem = eval( "document.all." + id )
|
27
|
-
link = eval( "document.all.l_" + id )
|
28
|
-
}
|
29
|
-
else
|
30
|
-
return false;
|
31
|
-
|
32
|
-
if( elem.style.display == "block" )
|
33
|
-
{
|
34
|
-
elem.style.display = "none"
|
35
|
-
link.innerHTML = "show source"
|
36
|
-
}
|
37
|
-
else
|
38
|
-
{
|
39
|
-
elem.style.display = "block"
|
40
|
-
link.innerHTML = "hide source"
|
41
|
-
}
|
42
|
-
}
|
43
|
-
|
44
|
-
function openCode( url )
|
45
|
-
{
|
46
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
47
|
-
}
|
48
|
-
// ]]>
|
49
|
-
</script>
|
50
|
-
</head>
|
51
|
-
|
52
|
-
<body>
|
53
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Module</span><br />Enumerable</td>
|
55
|
-
<td align="right">
|
56
|
-
<table cellspacing=0 cellpadding=2>
|
57
|
-
<tr valign="top">
|
58
|
-
<td>In:</td>
|
59
|
-
<td>
|
60
|
-
<a href="../files/lib/facets/core/enumerable/find_collisions_rb.html">lib/facets/core/enumerable/find_collisions.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/enumerable/ew_rb.html">lib/facets/core/enumerable/ew.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/enumerable/graph_rb.html">lib/facets/core/enumerable/graph.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/enumerable/filter_collect_rb.html">lib/facets/core/enumerable/filter_collect.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/enumerable/ideal_entropy_rb.html">lib/facets/core/enumerable/ideal_entropy.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/enumerable/where_rb.html">lib/facets/core/enumerable/where.rb</a>
|
66
|
-
<a href="../files/lib/facets/core/enumerable/partition_by_rb.html">lib/facets/core/enumerable/partition_by.rb</a>
|
67
|
-
<a href="../files/lib/facets/core/enumerable/nonuniq_rb.html">lib/facets/core/enumerable/nonuniq.rb</a>
|
68
|
-
<a href="../files/lib/facets/core/enumerable/probability_rb.html">lib/facets/core/enumerable/probability.rb</a>
|
69
|
-
<a href="../files/lib/facets/core/enumerable/collect_with_index_rb.html">lib/facets/core/enumerable/collect_with_index.rb</a>
|
70
|
-
<a href="../files/lib/facets/core/enumerable/to_h_rb.html">lib/facets/core/enumerable/to_h.rb</a>
|
71
|
-
<a href="../files/lib/facets/core/enumerable/each_pair_rb.html">lib/facets/core/enumerable/each_pair.rb</a>
|
72
|
-
<a href="../files/lib/facets/core/enumerable/every_rb.html">lib/facets/core/enumerable/every.rb</a>
|
73
|
-
<a href="../files/lib/facets/core/enumerable/compact_collect_rb.html">lib/facets/core/enumerable/compact_collect.rb</a>
|
74
|
-
<a href="../files/lib/facets/core/enumerable/one_rb.html">lib/facets/core/enumerable/one.rb</a>
|
75
|
-
<a href="../files/lib/facets/core/enumerable/none_rb.html">lib/facets/core/enumerable/none.rb</a>
|
76
|
-
<a href="../files/lib/facets/core/enumerable/project_rb.html">lib/facets/core/enumerable/project.rb</a>
|
77
|
-
<a href="../files/lib/facets/core/enumerable/op_pow_rb.html">lib/facets/core/enumerable/op_pow.rb</a>
|
78
|
-
<a href="../files/lib/facets/core/enumerable/frequency_rb.html">lib/facets/core/enumerable/frequency.rb</a>
|
79
|
-
<a href="../files/lib/facets/core/enumerable/permute_rb.html">lib/facets/core/enumerable/permute.rb</a>
|
80
|
-
<a href="../files/lib/facets/core/enumerable/occur_rb.html">lib/facets/core/enumerable/occur.rb</a>
|
81
|
-
<a href="../files/lib/facets/core/enumerable/commonality_rb.html">lib/facets/core/enumerable/commonality.rb</a>
|
82
|
-
<a href="../files/lib/facets/core/enumerable/each_slice_rb.html">lib/facets/core/enumerable/each_slice.rb</a>
|
83
|
-
<a href="../files/lib/facets/core/enumerable/entropy_rb.html">lib/facets/core/enumerable/entropy.rb</a>
|
84
|
-
<a href="../files/lib/facets/core/enumerable/each_with_counter_rb.html">lib/facets/core/enumerable/each_with_counter.rb</a>
|
85
|
-
<a href="../files/lib/facets/core/enumerable/uniq_by_rb.html">lib/facets/core/enumerable/uniq_by.rb</a>
|
86
|
-
<a href="../files/lib/facets/core/enumerable/cross_rb.html">lib/facets/core/enumerable/cross.rb</a>
|
87
|
-
<a href="../files/lib/facets/core/enumerable/accumulate_rb.html">lib/facets/core/enumerable/accumulate.rb</a>
|
88
|
-
<a href="../files/lib/facets/core/enumerable/collect_if_rb.html">lib/facets/core/enumerable/collect_if.rb</a>
|
89
|
-
<a href="../files/lib/facets/core/enumerable/count_rb.html">lib/facets/core/enumerable/count.rb</a>
|
90
|
-
<a href="../files/lib/facets/core/enumerable/mode_rb.html">lib/facets/core/enumerable/mode.rb</a>
|
91
|
-
<a href="../files/lib/facets/core/enumerable/cascade_rb.html">lib/facets/core/enumerable/cascade.rb</a>
|
92
|
-
<a href="../files/lib/facets/core/enumerable/self/combinations_rb.html">lib/facets/core/enumerable/self/combinations.rb</a>
|
93
|
-
<a href="../files/lib/facets/core/enumerable/self/cross_rb.html">lib/facets/core/enumerable/self/cross.rb</a>
|
94
|
-
</td>
|
95
|
-
</tr>
|
96
|
-
</table>
|
97
|
-
</td>
|
98
|
-
</tr>
|
99
|
-
</table>
|
100
|
-
<!-- banner header -->
|
101
|
-
|
102
|
-
<div id="bodyContent">
|
103
|
-
<div id="content">
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<div class="sectiontitle">Methods</div>
|
109
|
-
<ul>
|
110
|
-
<li><a href="#M000490">**</a></li>
|
111
|
-
<li><a href="#M000502">accumulate</a></li>
|
112
|
-
<li><a href="#M000507">cascade</a></li>
|
113
|
-
<li><a href="#M000503">collect_if</a></li>
|
114
|
-
<li><a href="#M000480">collect_with_counter</a></li>
|
115
|
-
<li><a href="#M000478">collect_with_index</a></li>
|
116
|
-
<li><a href="#M000508">combinations</a></li>
|
117
|
-
<li><a href="#M000496">commonality</a></li>
|
118
|
-
<li><a href="#M000485">compact_collect</a></li>
|
119
|
-
<li><a href="#M000486">compact_map</a></li>
|
120
|
-
<li><a href="#M000505">count</a></li>
|
121
|
-
<li><a href="#M000501">cross</a></li>
|
122
|
-
<li><a href="#M000509">cross</a></li>
|
123
|
-
<li><a href="#M000498">each_by</a></li>
|
124
|
-
<li><a href="#M000483">each_pair</a></li>
|
125
|
-
<li><a href="#M000494">each_permutation</a></li>
|
126
|
-
<li><a href="#M000497">each_slice</a></li>
|
127
|
-
<li><a href="#M000467">elementwise</a></li>
|
128
|
-
<li><a href="#M000499">entropy</a></li>
|
129
|
-
<li><a href="#M000484">every</a></li>
|
130
|
-
<li><a href="#M000468">ew</a></li>
|
131
|
-
<li><a href="#M000470">filter_collect</a></li>
|
132
|
-
<li><a href="#M000471">filter_map</a></li>
|
133
|
-
<li><a href="#M000466">find_collisions</a></li>
|
134
|
-
<li><a href="#M000491">frequency</a></li>
|
135
|
-
<li><a href="#M000469">graph</a></li>
|
136
|
-
<li><a href="#M000472">ideal_entropy</a></li>
|
137
|
-
<li><a href="#M000504">map_if</a></li>
|
138
|
-
<li><a href="#M000481">map_with_counter</a></li>
|
139
|
-
<li><a href="#M000479">map_with_index</a></li>
|
140
|
-
<li><a href="#M000506">mode</a></li>
|
141
|
-
<li><a href="#M000488">none?</a></li>
|
142
|
-
<li><a href="#M000475">nonuniq</a></li>
|
143
|
-
<li><a href="#M000476">nonuniq!</a></li>
|
144
|
-
<li><a href="#M000495">occur</a></li>
|
145
|
-
<li><a href="#M000487">one?</a></li>
|
146
|
-
<li><a href="#M000474">partition_by</a></li>
|
147
|
-
<li><a href="#M000493">permutation_number</a></li>
|
148
|
-
<li><a href="#M000492">permute</a></li>
|
149
|
-
<li><a href="#M000477">probability</a></li>
|
150
|
-
<li><a href="#M000489">project</a></li>
|
151
|
-
<li><a href="#M000482">to_h</a></li>
|
152
|
-
<li><a href="#M000500">uniq_by</a></li>
|
153
|
-
<li><a href="#M000473">where</a></li>
|
154
|
-
</ul>
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<div class="sectiontitle">Public Class methods</div>
|
162
|
-
<div class="method">
|
163
|
-
<div class="title">
|
164
|
-
<a name="M000508"></a><b>combinations</b>(head, *rest)
|
165
|
-
</div>
|
166
|
-
<div class="description">
|
167
|
-
<p>
|
168
|
-
Produces an array of arrays of all possible combinations of the given
|
169
|
-
arrays in the position given. (Explain me better?)
|
170
|
-
</p>
|
171
|
-
<pre>
|
172
|
-
a = %w|a b|
|
173
|
-
b = %w|a x|
|
174
|
-
c = %w|x y|
|
175
|
-
Array.combinations(a, b, c).each { |x| p x }
|
176
|
-
</pre>
|
177
|
-
<p>
|
178
|
-
produces
|
179
|
-
</p>
|
180
|
-
<pre>
|
181
|
-
["a", "a", "x"]
|
182
|
-
["a", "a", "y"]
|
183
|
-
["a", "x", "x"]
|
184
|
-
["a", "x", "y"]
|
185
|
-
["b", "a", "x"]
|
186
|
-
["b", "a", "y"]
|
187
|
-
["b", "x", "x"]
|
188
|
-
["b", "x", "y"]
|
189
|
-
</pre>
|
190
|
-
</div>
|
191
|
-
<div class="sourcecode">
|
192
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000508_source')" id="l_M000508_source">show source</a> ]</p>
|
193
|
-
<div id="M000508_source" class="dyn-source">
|
194
|
-
<pre>
|
195
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/combinations.rb, line 23</span>
|
196
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">combinations</span>(<span class="ruby-identifier">head</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">rest</span>)
|
197
|
-
<span class="ruby-identifier">crest</span> = <span class="ruby-identifier">rest</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-value">? </span>[[]] <span class="ruby-operator">:</span> <span class="ruby-identifier">combinations</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">rest</span>)
|
198
|
-
<span class="ruby-identifier">head</span>.<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">combs</span>, <span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
199
|
-
<span class="ruby-identifier">combs</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">crest</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">comb</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">item</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">comb</span> }
|
200
|
-
}
|
201
|
-
<span class="ruby-keyword kw">end</span>
|
202
|
-
</pre>
|
203
|
-
</div>
|
204
|
-
</div>
|
205
|
-
</div>
|
206
|
-
<div class="method">
|
207
|
-
<div class="title">
|
208
|
-
<a name="M000509"></a><b>cross</b>(*enums, &block)
|
209
|
-
</div>
|
210
|
-
<div class="description">
|
211
|
-
<p>
|
212
|
-
Provides the cross-product of two or more Enumerables. This is the
|
213
|
-
class-level method. The instance method calls on this.
|
214
|
-
</p>
|
215
|
-
<pre>
|
216
|
-
Enumerable.cross([1,2], [4], ["apple", "banana"])
|
217
|
-
#=> [[1, 4, "apple"], [1, 4, "banana"], [2, 4, "apple"], [2, 4, "banana"]]
|
218
|
-
|
219
|
-
Enumerable.cross([1,2], [3,4])
|
220
|
-
#=> [[1, 3], [1, 4], [2, 3], [2, 4]]
|
221
|
-
</pre>
|
222
|
-
</div>
|
223
|
-
<div class="sourcecode">
|
224
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000509_source')" id="l_M000509_source">show source</a> ]</p>
|
225
|
-
<div id="M000509_source" class="dyn-source">
|
226
|
-
<pre>
|
227
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/cross.rb, line 21</span>
|
228
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
229
|
-
|
230
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">enums</span>.<span class="ruby-identifier">empty?</span>
|
231
|
-
<span class="ruby-identifier">gens</span> = <span class="ruby-identifier">enums</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-constant">Generator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">e</span>)}
|
232
|
-
<span class="ruby-keyword kw">return</span> [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gens</span>.<span class="ruby-identifier">any?</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">g</span><span class="ruby-operator">|</span> <span class="ruby-identifier">g</span>.<span class="ruby-identifier">end?</span>}
|
233
|
-
|
234
|
-
<span class="ruby-identifier">sz</span> = <span class="ruby-identifier">gens</span>.<span class="ruby-identifier">size</span>
|
235
|
-
<span class="ruby-identifier">res</span> = []
|
236
|
-
<span class="ruby-identifier">tuple</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sz</span>)
|
237
|
-
|
238
|
-
<span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
239
|
-
<span class="ruby-comment cmt"># fill tuple</span>
|
240
|
-
(<span class="ruby-value">0</span> <span class="ruby-operator">...</span> <span class="ruby-identifier">sz</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
241
|
-
<span class="ruby-identifier">tuple</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">current</span>
|
242
|
-
}
|
243
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
|
244
|
-
<span class="ruby-identifier">res</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>
|
245
|
-
<span class="ruby-keyword kw">else</span>
|
246
|
-
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>)
|
247
|
-
<span class="ruby-keyword kw">end</span>
|
248
|
-
|
249
|
-
<span class="ruby-comment cmt"># step forward</span>
|
250
|
-
<span class="ruby-identifier">gens</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">next</span>
|
251
|
-
(<span class="ruby-identifier">sz</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>).<span class="ruby-identifier">downto</span>(<span class="ruby-value">0</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
252
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">end?</span>
|
253
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
254
|
-
<span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">rewind</span>
|
255
|
-
<span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">next</span>
|
256
|
-
<span class="ruby-keyword kw">else</span>
|
257
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">res</span>
|
258
|
-
<span class="ruby-keyword kw">end</span>
|
259
|
-
<span class="ruby-keyword kw">end</span>
|
260
|
-
<span class="ruby-keyword kw">end</span>
|
261
|
-
<span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#loop</span>
|
262
|
-
|
263
|
-
<span class="ruby-keyword kw">end</span>
|
264
|
-
</pre>
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
</div>
|
268
|
-
<div class="sectiontitle">Public Instance methods</div>
|
269
|
-
<div class="method">
|
270
|
-
<div class="title">
|
271
|
-
<a name="M000490"></a><b>**</b>(enum)
|
272
|
-
</div>
|
273
|
-
<div class="description">
|
274
|
-
<p>
|
275
|
-
Operator alias for cross-product.
|
276
|
-
</p>
|
277
|
-
<pre>
|
278
|
-
a = [1,2] ** [4,5]
|
279
|
-
a #=> [[1, 4],[1, 5],[2, 4],[2, 5]]
|
280
|
-
</pre>
|
281
|
-
</div>
|
282
|
-
<div class="sourcecode">
|
283
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000490_source')" id="l_M000490_source">show source</a> ]</p>
|
284
|
-
<div id="M000490_source" class="dyn-source">
|
285
|
-
<pre>
|
286
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/op_pow.rb, line 11</span>
|
287
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-identifier">enum</span>)
|
288
|
-
<span class="ruby-constant">Enumerable</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">enum</span>)
|
289
|
-
<span class="ruby-keyword kw">end</span>
|
290
|
-
</pre>
|
291
|
-
</div>
|
292
|
-
</div>
|
293
|
-
</div>
|
294
|
-
<div class="method">
|
295
|
-
<div class="title">
|
296
|
-
<a name="M000502"></a><b>accumulate</b>()
|
297
|
-
</div>
|
298
|
-
<div class="description">
|
299
|
-
<p>
|
300
|
-
Project has_many Group Group has_many User projects.groups.accumulate.users
|
301
|
-
</p>
|
302
|
-
</div>
|
303
|
-
<div class="sourcecode">
|
304
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000502_source')" id="l_M000502_source">show source</a> ]</p>
|
305
|
-
<div id="M000502_source" class="dyn-source">
|
306
|
-
<pre>
|
307
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/accumulate.rb, line 16</span>
|
308
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accumulate</span>
|
309
|
-
<span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
310
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>, <span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }.<span class="ruby-identifier">flatten</span>
|
311
|
-
<span class="ruby-keyword kw">end</span>
|
312
|
-
<span class="ruby-keyword kw">end</span>
|
313
|
-
</pre>
|
314
|
-
</div>
|
315
|
-
</div>
|
316
|
-
</div>
|
317
|
-
<div class="method">
|
318
|
-
<div class="title">
|
319
|
-
<a name="M000507"></a><b>cascade</b>(*methods)
|
320
|
-
</div>
|
321
|
-
<div class="description">
|
322
|
-
<p>
|
323
|
-
Cascade actions on each enumerated element.
|
324
|
-
</p>
|
325
|
-
<p>
|
326
|
-
[9, 19, 29].cascade :succ, :to_s, :reverse
|
327
|
-
</p>
|
328
|
-
<h1>> ["01", "02", "03"]</h1>
|
329
|
-
</div>
|
330
|
-
<div class="sourcecode">
|
331
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000507_source')" id="l_M000507_source">show source</a> ]</p>
|
332
|
-
<div id="M000507_source" class="dyn-source">
|
333
|
-
<pre>
|
334
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/cascade.rb, line 12</span>
|
335
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cascade</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">methods</span>)
|
336
|
-
<span class="ruby-identifier">methods</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-keyword kw">self</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">ary</span>, <span class="ruby-identifier">method</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ary</span>.<span class="ruby-identifier">map</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method</span>)}}
|
337
|
-
<span class="ruby-keyword kw">end</span>
|
338
|
-
</pre>
|
339
|
-
</div>
|
340
|
-
</div>
|
341
|
-
</div>
|
342
|
-
<div class="method">
|
343
|
-
<div class="title">
|
344
|
-
<a name="M000503"></a><b>collect_if</b>(&b)
|
345
|
-
</div>
|
346
|
-
<div class="aka">
|
347
|
-
This method is also aliased as
|
348
|
-
<a href="Enumerable.html#M000504">map_if</a>
|
349
|
-
</div>
|
350
|
-
<div class="sourcecode">
|
351
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000503_source')" id="l_M000503_source">show source</a> ]</p>
|
352
|
-
<div id="M000503_source" class="dyn-source">
|
353
|
-
<pre>
|
354
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_if.rb, line 4</span>
|
355
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_if</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
356
|
-
<span class="ruby-identifier">a</span> = <span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
357
|
-
<span class="ruby-comment cmt"># to get the same semantics as select{|e| e}</span>
|
358
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">false</span>)
|
359
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">compact!</span>
|
360
|
-
<span class="ruby-identifier">a</span>
|
361
|
-
<span class="ruby-keyword kw">end</span>
|
362
|
-
</pre>
|
363
|
-
</div>
|
364
|
-
</div>
|
365
|
-
</div>
|
366
|
-
<div class="method">
|
367
|
-
<div class="title">
|
368
|
-
<a name="M000480"></a><b>collect_with_counter</b>()
|
369
|
-
</div>
|
370
|
-
<div class="description">
|
371
|
-
<p>
|
372
|
-
Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
|
373
|
-
</p>
|
374
|
-
</div>
|
375
|
-
</div>
|
376
|
-
<div class="method">
|
377
|
-
<div class="title">
|
378
|
-
<a name="M000478"></a><b>collect_with_index</b>() {|self[i], i| ...}
|
379
|
-
</div>
|
380
|
-
<div class="description">
|
381
|
-
<p>
|
382
|
-
Same as collect but with an iteration counter.
|
383
|
-
</p>
|
384
|
-
<pre>
|
385
|
-
a = [1,2,3].collect_with_index { |e,i| e*i }
|
386
|
-
a #=> [0,2,6]
|
387
|
-
</pre>
|
388
|
-
</div>
|
389
|
-
<div class="aka">
|
390
|
-
This method is also aliased as
|
391
|
-
<a href="Enumerable.html#M000479">map_with_index</a>
|
392
|
-
<a href="Enumerable.html#M000480">collect_with_counter</a>
|
393
|
-
<a href="Enumerable.html#M000481">map_with_counter</a>
|
394
|
-
</div>
|
395
|
-
<div class="sourcecode">
|
396
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000478_source')" id="l_M000478_source">show source</a> ]</p>
|
397
|
-
<div id="M000478_source" class="dyn-source">
|
398
|
-
<pre>
|
399
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_with_index.rb, line 9</span>
|
400
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_with_index</span>
|
401
|
-
<span class="ruby-identifier">r</span> = []
|
402
|
-
<span class="ruby-identifier">each_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
403
|
-
<span class="ruby-identifier">r</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">i</span>)
|
404
|
-
<span class="ruby-keyword kw">end</span>
|
405
|
-
<span class="ruby-identifier">r</span>
|
406
|
-
<span class="ruby-keyword kw">end</span>
|
407
|
-
</pre>
|
408
|
-
</div>
|
409
|
-
</div>
|
410
|
-
</div>
|
411
|
-
<div class="method">
|
412
|
-
<div class="title">
|
413
|
-
<a name="M000496"></a><b>commonality</b>( &block )
|
414
|
-
</div>
|
415
|
-
<div class="description">
|
416
|
-
<p>
|
417
|
-
Returns all items that are equal in terms of the supplied block. If no
|
418
|
-
block is given objects are considered to be equal if they return the same
|
419
|
-
value for Object#hash and if obj1 == obj2. No guarantee about the order of
|
420
|
-
the elements in the resulting array is made.
|
421
|
-
</p>
|
422
|
-
<p>
|
423
|
-
Note: The result will be an array if you supply no block and a hash
|
424
|
-
otherwise.
|
425
|
-
</p>
|
426
|
-
<pre>
|
427
|
-
[1, 2, 2, 3, 4, 4].commonality # => { 2 => [2], 4 => [4] }
|
428
|
-
|
429
|
-
["foo", "bar", "a"].commonality { |str| str.length }
|
430
|
-
# => { 2 => ["foo, "bar"] }
|
431
|
-
|
432
|
-
# Returns all persons that share their last name with another person.
|
433
|
-
persons.collisions { |person| person.last_name }
|
434
|
-
</pre>
|
435
|
-
</div>
|
436
|
-
<div class="sourcecode">
|
437
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000496_source')" id="l_M000496_source">show source</a> ]</p>
|
438
|
-
<div id="M000496_source" class="dyn-source">
|
439
|
-
<pre>
|
440
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/commonality.rb, line 22</span>
|
441
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
442
|
-
<span class="ruby-identifier">had_no_block</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">block</span>
|
443
|
-
<span class="ruby-identifier">block</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-identifier">item</span> }
|
444
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> }
|
445
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
446
|
-
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">item</span>)
|
447
|
-
<span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">item</span>
|
448
|
-
<span class="ruby-keyword kw">end</span>
|
449
|
-
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span>
|
450
|
-
<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><=</span> <span class="ruby-value">1</span>
|
451
|
-
<span class="ruby-keyword kw">end</span>
|
452
|
-
<span class="ruby-comment cmt">#return had_no_block ? result.values.flatten : result</span>
|
453
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
454
|
-
<span class="ruby-keyword kw">end</span>
|
455
|
-
</pre>
|
456
|
-
</div>
|
457
|
-
</div>
|
458
|
-
</div>
|
459
|
-
<div class="method">
|
460
|
-
<div class="title">
|
461
|
-
<a name="M000485"></a><b>compact_collect</b>( {|| ...}
|
462
|
-
</div>
|
463
|
-
<div class="description">
|
464
|
-
<p>
|
465
|
-
Collects/Maps and compacts items in one single step. The items for which
|
466
|
-
the supplied block returns <tt>nil</tt> will not end up in the resulting
|
467
|
-
array.
|
468
|
-
</p>
|
469
|
-
<pre>
|
470
|
-
# Return telephone numbers of all persons that have a telephone number.
|
471
|
-
persons.compact_collect { |person| person.telephone_no }
|
472
|
-
</pre>
|
473
|
-
<p>
|
474
|
-
Also see Enumerable#collect, Enumerable#map, Array#compact.
|
475
|
-
</p>
|
476
|
-
</div>
|
477
|
-
<div class="aka">
|
478
|
-
This method is also aliased as
|
479
|
-
<a href="Enumerable.html#M000486">compact_map</a>
|
480
|
-
</div>
|
481
|
-
<div class="sourcecode">
|
482
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000485_source')" id="l_M000485_source">show source</a> ]</p>
|
483
|
-
<div id="M000485_source" class="dyn-source">
|
484
|
-
<pre>
|
485
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/compact_collect.rb, line 17</span>
|
486
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compact_collect</span> <span class="ruby-comment cmt">#:yield:</span>
|
487
|
-
<span class="ruby-identifier">filter_collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
488
|
-
<span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
|
489
|
-
<span class="ruby-identifier">throw</span>(<span class="ruby-identifier">:skip</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_item</span>.<span class="ruby-identifier">nil?</span>
|
490
|
-
<span class="ruby-identifier">new_item</span>
|
491
|
-
<span class="ruby-keyword kw">end</span>
|
492
|
-
<span class="ruby-keyword kw">end</span>
|
493
|
-
</pre>
|
494
|
-
</div>
|
495
|
-
</div>
|
496
|
-
</div>
|
497
|
-
<div class="method">
|
498
|
-
<div class="title">
|
499
|
-
<a name="M000486"></a><b>compact_map</b>(
|
500
|
-
</div>
|
501
|
-
<div class="description">
|
502
|
-
<p>
|
503
|
-
Alias for <a href="Enumerable.html#M000485">compact_collect</a>
|
504
|
-
</p>
|
505
|
-
</div>
|
506
|
-
</div>
|
507
|
-
<div class="method">
|
508
|
-
<div class="title">
|
509
|
-
<a name="M000505"></a><b>count</b>(*c)
|
510
|
-
</div>
|
511
|
-
<div class="description">
|
512
|
-
<p>
|
513
|
-
Count the number of items in an enuerable equal (==) to the given object.
|
514
|
-
</p>
|
515
|
-
<pre>
|
516
|
-
e = [ 'a', '1', 'a' ]
|
517
|
-
e.count('1') #=> 1
|
518
|
-
e.count('a') #=> 2
|
519
|
-
</pre>
|
520
|
-
<p>
|
521
|
-
Count can also handle multiple-valued blocks.
|
522
|
-
</p>
|
523
|
-
<pre>
|
524
|
-
e = { 'a' => 2, 'a' => 2, 'b' => 1 }
|
525
|
-
e.count('a',2) #=> 1
|
526
|
-
</pre>
|
527
|
-
</div>
|
528
|
-
<div class="sourcecode">
|
529
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000505_source')" id="l_M000505_source">show source</a> ]</p>
|
530
|
-
<div id="M000505_source" class="dyn-source">
|
531
|
-
<pre>
|
532
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/count.rb, line 16</span>
|
533
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">c</span>)
|
534
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">select</span>{ <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">c</span> }.<span class="ruby-identifier">length</span>
|
535
|
-
<span class="ruby-keyword kw">end</span>
|
536
|
-
</pre>
|
537
|
-
</div>
|
538
|
-
</div>
|
539
|
-
</div>
|
540
|
-
<div class="method">
|
541
|
-
<div class="title">
|
542
|
-
<a name="M000501"></a><b>cross</b>(*enums, &block)
|
543
|
-
</div>
|
544
|
-
<div class="description">
|
545
|
-
<p>
|
546
|
-
The instance level cross-product method.
|
547
|
-
</p>
|
548
|
-
<pre>
|
549
|
-
a = []
|
550
|
-
[1,2].cross([4,5]){|elem| a << elem }
|
551
|
-
a #=> [[1, 4],[1, 5],[2, 4],[2, 5]]
|
552
|
-
</pre>
|
553
|
-
</div>
|
554
|
-
<div class="sourcecode">
|
555
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000501_source')" id="l_M000501_source">show source</a> ]</p>
|
556
|
-
<div id="M000501_source" class="dyn-source">
|
557
|
-
<pre>
|
558
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/cross.rb, line 17</span>
|
559
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cross</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
560
|
-
<span class="ruby-constant">Enumerable</span>.<span class="ruby-identifier">cross</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">enums</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
561
|
-
<span class="ruby-keyword kw">end</span>
|
562
|
-
</pre>
|
563
|
-
</div>
|
564
|
-
</div>
|
565
|
-
</div>
|
566
|
-
<div class="method">
|
567
|
-
<div class="title">
|
568
|
-
<a name="M000498"></a><b>each_by</b>(step=nil, &yld)
|
569
|
-
</div>
|
570
|
-
<div class="description">
|
571
|
-
<p>
|
572
|
-
Alias for <a href="Enumerable.html#M000497">each_slice</a>
|
573
|
-
</p>
|
574
|
-
</div>
|
575
|
-
</div>
|
576
|
-
<div class="method">
|
577
|
-
<div class="title">
|
578
|
-
<a name="M000483"></a><b>each_pair</b>( {|| ...}
|
579
|
-
</div>
|
580
|
-
<div class="description">
|
581
|
-
<p>
|
582
|
-
Iterators ovr each element pairing.
|
583
|
-
</p>
|
584
|
-
<pre>
|
585
|
-
[:a,:b,:c,:d].each_pair { |a,b| puts "#{a} -> #{b}" }
|
586
|
-
</pre>
|
587
|
-
<p>
|
588
|
-
<em>produces</em>
|
589
|
-
</p>
|
590
|
-
<pre>
|
591
|
-
a -> b
|
592
|
-
c -> d
|
593
|
-
</pre>
|
594
|
-
</div>
|
595
|
-
<div class="sourcecode">
|
596
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000483_source')" id="l_M000483_source">show source</a> ]</p>
|
597
|
-
<div id="M000483_source" class="dyn-source">
|
598
|
-
<pre>
|
599
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_pair.rb, line 13</span>
|
600
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_pair</span> <span class="ruby-comment cmt">#:yield:</span>
|
601
|
-
<span class="ruby-identifier">e1</span> = <span class="ruby-keyword kw">nil</span>
|
602
|
-
<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
603
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">%</span> <span class="ruby-value">2</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
604
|
-
<span class="ruby-identifier">e1</span> = <span class="ruby-identifier">e</span>
|
605
|
-
<span class="ruby-keyword kw">next</span>
|
606
|
-
<span class="ruby-keyword kw">else</span>
|
607
|
-
<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e1</span>,<span class="ruby-identifier">e</span>)
|
608
|
-
<span class="ruby-keyword kw">end</span>
|
609
|
-
<span class="ruby-keyword kw">end</span>
|
610
|
-
<span class="ruby-keyword kw">end</span>
|
611
|
-
</pre>
|
612
|
-
</div>
|
613
|
-
</div>
|
614
|
-
</div>
|
615
|
-
<div class="method">
|
616
|
-
<div class="title">
|
617
|
-
<a name="M000494"></a><b>each_permutation</b>() {|out| ...}
|
618
|
-
</div>
|
619
|
-
<div class="description">
|
620
|
-
<p>
|
621
|
-
Applys a block to each possible permutation of an array/enumerable.
|
622
|
-
</p>
|
623
|
-
<pre>
|
624
|
-
%w[a b c].each_permutation { |x| puts(x.join('')) }
|
625
|
-
</pre>
|
626
|
-
<p>
|
627
|
-
produces
|
628
|
-
</p>
|
629
|
-
<pre>
|
630
|
-
abc
|
631
|
-
acb
|
632
|
-
bac
|
633
|
-
bca
|
634
|
-
cab
|
635
|
-
cba
|
636
|
-
</pre>
|
637
|
-
</div>
|
638
|
-
<div class="sourcecode">
|
639
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000494_source')" id="l_M000494_source">show source</a> ]</p>
|
640
|
-
<div id="M000494_source" class="dyn-source">
|
641
|
-
<pre>
|
642
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 49</span>
|
643
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_permutation</span>()
|
644
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
645
|
-
<span class="ruby-identifier">size</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>
|
646
|
-
<span class="ruby-identifier">perm_count</span> = (<span class="ruby-value">1</span><span class="ruby-operator">...</span><span class="ruby-identifier">size</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">x</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">factorial</span> }
|
647
|
-
<span class="ruby-identifier">weights</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> (<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>).<span class="ruby-identifier">factorial</span> }
|
648
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">weights</span>.<span class="ruby-identifier">size</span>
|
649
|
-
<span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span>,<span class="ruby-identifier">v</span>,<span class="ruby-identifier">pos</span> = <span class="ruby-keyword kw">nil</span>
|
650
|
-
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">perm_count</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
651
|
-
<span class="ruby-identifier">out</span> = <span class="ruby-identifier">arr</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">0</span>]
|
652
|
-
<span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
653
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
|
654
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">:</span> <span class="ruby-keyword kw">next</span>
|
655
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">s</span><span class="ruby-operator">:</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">v</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>], <span class="ruby-identifier">x</span>)
|
656
|
-
<span class="ruby-keyword kw">else</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">v</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">/</span> <span class="ruby-identifier">weights</span>[<span class="ruby-identifier">i</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>], <span class="ruby-identifier">x</span>)
|
657
|
-
<span class="ruby-keyword kw">end</span>
|
658
|
-
}
|
659
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">out</span>
|
660
|
-
<span class="ruby-keyword kw">end</span>
|
661
|
-
<span class="ruby-keyword kw">end</span>
|
662
|
-
</pre>
|
663
|
-
</div>
|
664
|
-
</div>
|
665
|
-
</div>
|
666
|
-
<div class="method">
|
667
|
-
<div class="title">
|
668
|
-
<a name="M000497"></a><b>each_slice</b>(step=nil, &yld)
|
669
|
-
</div>
|
670
|
-
<div class="description">
|
671
|
-
<p>
|
672
|
-
Iterate through slices. If slicing <em>step</em> is not given, the the
|
673
|
-
arity if the block is used.
|
674
|
-
</p>
|
675
|
-
<pre>
|
676
|
-
x = []
|
677
|
-
[1,2,3,4].each_slice(2){ |a,b| x << [a,b] }
|
678
|
-
x #=> [ [1,2], [3,4] ]
|
679
|
-
|
680
|
-
x = []
|
681
|
-
[1,2,3,4,5,6].each_slice(3){ |a| x << a }
|
682
|
-
x #=> [ [1,2,3], [4,5,6] ]
|
683
|
-
</pre>
|
684
|
-
</div>
|
685
|
-
<div class="aka">
|
686
|
-
This method is also aliased as
|
687
|
-
<a href="Enumerable.html#M000498">each_by</a>
|
688
|
-
</div>
|
689
|
-
<div class="sourcecode">
|
690
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000497_source')" id="l_M000497_source">show source</a> ]</p>
|
691
|
-
<div id="M000497_source" class="dyn-source">
|
692
|
-
<pre>
|
693
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_slice.rb, line 15</span>
|
694
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_slice</span>(<span class="ruby-identifier">step</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
695
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">step</span>
|
696
|
-
<span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">step</span>
|
697
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
|
698
|
-
<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">cnt</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
699
|
-
<span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
700
|
-
<span class="ruby-identifier">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-identifier">i</span><span class="ruby-operator">*</span><span class="ruby-identifier">cnt</span>,<span class="ruby-identifier">cnt</span>))
|
701
|
-
}
|
702
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
|
703
|
-
<span class="ruby-keyword kw">else</span>
|
704
|
-
<span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">arity</span>.<span class="ruby-identifier">abs</span>
|
705
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
|
706
|
-
<span class="ruby-identifier">n</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">length</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">cnt</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
707
|
-
<span class="ruby-identifier">n</span>.<span class="ruby-identifier">times</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
708
|
-
<span class="ruby-identifier">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-identifier">i</span><span class="ruby-operator">*</span><span class="ruby-identifier">cnt</span>,<span class="ruby-identifier">cnt</span>))
|
709
|
-
}
|
710
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
|
711
|
-
<span class="ruby-keyword kw">end</span>
|
712
|
-
<span class="ruby-keyword kw">end</span>
|
713
|
-
</pre>
|
714
|
-
</div>
|
715
|
-
</div>
|
716
|
-
</div>
|
717
|
-
<div class="method">
|
718
|
-
<div class="title">
|
719
|
-
<a name="M000467"></a><b>elementwise</b>()
|
720
|
-
</div>
|
721
|
-
<div class="description">
|
722
|
-
<p>
|
723
|
-
Returns an elementwise Functor designed to make R-like elementwise
|
724
|
-
operations possible.
|
725
|
-
</p>
|
726
|
-
<pre>
|
727
|
-
[1,2].ew + 3 #=> [4,5]
|
728
|
-
[1,2].ew + [4,5] #=> [5,7]
|
729
|
-
[1,2].ew + [[4,5],3] #=> [[5,7],[4,5]
|
730
|
-
</pre>
|
731
|
-
</div>
|
732
|
-
<div class="aka">
|
733
|
-
This method is also aliased as
|
734
|
-
<a href="Enumerable.html#M000468">ew</a>
|
735
|
-
</div>
|
736
|
-
<div class="sourcecode">
|
737
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000467_source')" id="l_M000467_source">show source</a> ]</p>
|
738
|
-
<div id="M000467_source" class="dyn-source">
|
739
|
-
<pre>
|
740
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/ew.rb, line 16</span>
|
741
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elementwise</span>
|
742
|
-
<span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
743
|
-
<span class="ruby-identifier">a</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
744
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Enumerable</span>)
|
745
|
-
<span class="ruby-identifier">ln</span> = ( <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-value">? </span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">arg</span>.<span class="ruby-identifier">length</span> )
|
746
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ln</span>].<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">ln</span>]).<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-identifier">b</span>) }
|
747
|
-
<span class="ruby-comment cmt">#self[0...ln].zip(arg[0...1n]).collect{ |a,b| b ? a.send(op,b) : nil }</span>
|
748
|
-
<span class="ruby-keyword kw">else</span>
|
749
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-identifier">arg</span>) }
|
750
|
-
<span class="ruby-keyword kw">end</span>
|
751
|
-
<span class="ruby-keyword kw">end</span>
|
752
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">flatten!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
753
|
-
<span class="ruby-identifier">a</span>
|
754
|
-
<span class="ruby-keyword kw">end</span>
|
755
|
-
<span class="ruby-keyword kw">end</span>
|
756
|
-
</pre>
|
757
|
-
</div>
|
758
|
-
</div>
|
759
|
-
</div>
|
760
|
-
<div class="method">
|
761
|
-
<div class="title">
|
762
|
-
<a name="M000499"></a><b>entropy</b>()
|
763
|
-
</div>
|
764
|
-
<div class="description">
|
765
|
-
<p>
|
766
|
-
Shannon’s entropy for an array - returns the average bits per symbol
|
767
|
-
required to encode the array. Lower values mean less "entropy" -
|
768
|
-
i.e. less unique information in the array.
|
769
|
-
</p>
|
770
|
-
<pre>
|
771
|
-
%w{ a b c d e e e }.entropy #=>
|
772
|
-
</pre>
|
773
|
-
</div>
|
774
|
-
<div class="sourcecode">
|
775
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000499_source')" id="l_M000499_source">show source</a> ]</p>
|
776
|
-
<div id="M000499_source" class="dyn-source">
|
777
|
-
<pre>
|
778
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/entropy.rb, line 15</span>
|
779
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>
|
780
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
|
781
|
-
<span class="ruby-identifier">probHash</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">probability</span>
|
782
|
-
<span class="ruby-comment cmt"># h is the Shannon entropy of the array</span>
|
783
|
-
<span class="ruby-identifier">h</span> = <span class="ruby-value">-1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">probHash</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">inject</span>(<span class="ruby-value">0</span>.<span class="ruby-identifier">to_f</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sum</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
784
|
-
<span class="ruby-identifier">sum</span> <span class="ruby-operator">+</span> (<span class="ruby-identifier">probHash</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">*</span> (<span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">probHash</span>[<span class="ruby-identifier">i</span>])<span class="ruby-operator">/</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2</span>.<span class="ruby-identifier">to_f</span>)))
|
785
|
-
<span class="ruby-keyword kw">end</span>
|
786
|
-
<span class="ruby-identifier">h</span>
|
787
|
-
<span class="ruby-keyword kw">end</span>
|
788
|
-
</pre>
|
789
|
-
</div>
|
790
|
-
</div>
|
791
|
-
</div>
|
792
|
-
<div class="method">
|
793
|
-
<div class="title">
|
794
|
-
<a name="M000484"></a><b>every</b>()
|
795
|
-
</div>
|
796
|
-
<div class="description">
|
797
|
-
<p>
|
798
|
-
Returns an elementwise Functor. This allows you to map a method on to every
|
799
|
-
element.
|
800
|
-
</p>
|
801
|
-
<pre>
|
802
|
-
[1,2,3].every + 3 #=> [4,5,6]
|
803
|
-
|
804
|
-
['a','b','c'].every.upcase #=> ['A','B','C']
|
805
|
-
</pre>
|
806
|
-
</div>
|
807
|
-
<div class="sourcecode">
|
808
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000484_source')" id="l_M000484_source">show source</a> ]</p>
|
809
|
-
<div id="M000484_source" class="dyn-source">
|
810
|
-
<pre>
|
811
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/every.rb, line 13</span>
|
812
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">every</span>
|
813
|
-
<span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
814
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">op</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
|
815
|
-
<span class="ruby-keyword kw">end</span>
|
816
|
-
<span class="ruby-keyword kw">end</span>
|
817
|
-
</pre>
|
818
|
-
</div>
|
819
|
-
</div>
|
820
|
-
</div>
|
821
|
-
<div class="method">
|
822
|
-
<div class="title">
|
823
|
-
<a name="M000468"></a><b>ew</b>()
|
824
|
-
</div>
|
825
|
-
<div class="description">
|
826
|
-
<p>
|
827
|
-
Alias for <a href="Enumerable.html#M000467">elementwise</a>
|
828
|
-
</p>
|
829
|
-
</div>
|
830
|
-
</div>
|
831
|
-
<div class="method">
|
832
|
-
<div class="title">
|
833
|
-
<a name="M000470"></a><b>filter_collect</b>( {|| ...}
|
834
|
-
</div>
|
835
|
-
<div class="description">
|
836
|
-
<p>
|
837
|
-
Collects/Maps and filters items out in one single step. You can use
|
838
|
-
throw(:skip) in the supplied block to indicate that the current item should
|
839
|
-
not end up in the resulting array.
|
840
|
-
</p>
|
841
|
-
<pre>
|
842
|
-
# Return names of all person with an age of at least 18.
|
843
|
-
persons.filter_collect do |person|
|
844
|
-
throw(:skip) if person.age < 18
|
845
|
-
person.name
|
846
|
-
end
|
847
|
-
</pre>
|
848
|
-
<p>
|
849
|
-
Also see Enumerable#collect, Enumerable#find_all.
|
850
|
-
</p>
|
851
|
-
</div>
|
852
|
-
<div class="aka">
|
853
|
-
This method is also aliased as
|
854
|
-
<a href="Enumerable.html#M000471">filter_map</a>
|
855
|
-
</div>
|
856
|
-
<div class="sourcecode">
|
857
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000470_source')" id="l_M000470_source">show source</a> ]</p>
|
858
|
-
<div id="M000470_source" class="dyn-source">
|
859
|
-
<pre>
|
860
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/filter_collect.rb, line 18</span>
|
861
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filter_collect</span> <span class="ruby-comment cmt">#:yield:</span>
|
862
|
-
<span class="ruby-identifier">result</span> = []
|
863
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
864
|
-
<span class="ruby-identifier">catch</span>(<span class="ruby-identifier">:skip</span>) <span class="ruby-keyword kw">do</span>
|
865
|
-
<span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
|
866
|
-
<span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_item</span>
|
867
|
-
<span class="ruby-keyword kw">end</span>
|
868
|
-
<span class="ruby-keyword kw">end</span>
|
869
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
870
|
-
<span class="ruby-keyword kw">end</span>
|
871
|
-
</pre>
|
872
|
-
</div>
|
873
|
-
</div>
|
874
|
-
</div>
|
875
|
-
<div class="method">
|
876
|
-
<div class="title">
|
877
|
-
<a name="M000471"></a><b>filter_map</b>(
|
878
|
-
</div>
|
879
|
-
<div class="description">
|
880
|
-
<p>
|
881
|
-
Alias for <a href="Enumerable.html#M000470">filter_collect</a>
|
882
|
-
</p>
|
883
|
-
</div>
|
884
|
-
</div>
|
885
|
-
<div class="method">
|
886
|
-
<div class="title">
|
887
|
-
<a name="M000466"></a><b>find_collisions</b>( ) {|| ...}
|
888
|
-
</div>
|
889
|
-
<div class="description">
|
890
|
-
<p>
|
891
|
-
Like commonality but returns an array if no block is given.
|
892
|
-
</p>
|
893
|
-
</div>
|
894
|
-
<div class="sourcecode">
|
895
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000466_source')" id="l_M000466_source">show source</a> ]</p>
|
896
|
-
<div id="M000466_source" class="dyn-source">
|
897
|
-
<pre>
|
898
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/find_collisions.rb, line 7</span>
|
899
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_collisions</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> ) <span class="ruby-comment cmt">#:yield:</span>
|
900
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
901
|
-
<span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
902
|
-
<span class="ruby-keyword kw">else</span>
|
903
|
-
<span class="ruby-identifier">commonality</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
|
904
|
-
<span class="ruby-keyword kw">end</span>
|
905
|
-
<span class="ruby-keyword kw">end</span>
|
906
|
-
</pre>
|
907
|
-
</div>
|
908
|
-
</div>
|
909
|
-
</div>
|
910
|
-
<div class="method">
|
911
|
-
<div class="title">
|
912
|
-
<a name="M000491"></a><b>frequency</b>()
|
913
|
-
</div>
|
914
|
-
<div class="description">
|
915
|
-
<p>
|
916
|
-
Generates a hash mapping each unique symbol in the array to the absolute
|
917
|
-
frequency it appears.
|
918
|
-
</p>
|
919
|
-
</div>
|
920
|
-
<div class="sourcecode">
|
921
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000491_source')" id="l_M000491_source">show source</a> ]</p>
|
922
|
-
<div id="M000491_source" class="dyn-source">
|
923
|
-
<pre>
|
924
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/frequency.rb, line 8</span>
|
925
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">frequency</span>
|
926
|
-
<span class="ruby-identifier">probs</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
927
|
-
<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">|</span>
|
928
|
-
<span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
929
|
-
<span class="ruby-keyword kw">end</span>
|
930
|
-
<span class="ruby-identifier">probs</span>
|
931
|
-
<span class="ruby-keyword kw">end</span>
|
932
|
-
</pre>
|
933
|
-
</div>
|
934
|
-
</div>
|
935
|
-
</div>
|
936
|
-
<div class="method">
|
937
|
-
<div class="title">
|
938
|
-
<a name="M000469"></a><b>graph</b>(&yld)
|
939
|
-
</div>
|
940
|
-
<div class="description">
|
941
|
-
<p>
|
942
|
-
Like <tt>map</tt>/<tt>collect</tt>, but it generates a <a
|
943
|
-
href="Hash.html">Hash</a>. The block is expected to return two values: the
|
944
|
-
key and the value for the new hash.
|
945
|
-
</p>
|
946
|
-
<pre>
|
947
|
-
numbers = (1..3)
|
948
|
-
squares = numbers.graph { |n| [n, n*n] } # { 1=>1, 2=>4, 3=>9 }
|
949
|
-
sq_roots = numbers.graph { |n| [n*n, n] } # { 1=>1, 4=>2, 9=>3 }
|
950
|
-
</pre>
|
951
|
-
</div>
|
952
|
-
<div class="sourcecode">
|
953
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000469_source')" id="l_M000469_source">show source</a> ]</p>
|
954
|
-
<div id="M000469_source" class="dyn-source">
|
955
|
-
<pre>
|
956
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/graph.rb, line 22</span>
|
957
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">graph</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
958
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">yld</span>
|
959
|
-
<span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">kv</span><span class="ruby-operator">|</span>
|
960
|
-
<span class="ruby-identifier">nk</span>, <span class="ruby-identifier">nv</span> = <span class="ruby-identifier">yld</span>[<span class="ruby-operator">*</span><span class="ruby-identifier">kv</span>]
|
961
|
-
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">nk</span>] = <span class="ruby-identifier">nv</span>
|
962
|
-
<span class="ruby-identifier">h</span>
|
963
|
-
<span class="ruby-keyword kw">end</span>
|
964
|
-
<span class="ruby-keyword kw">else</span>
|
965
|
-
<span class="ruby-constant">Hash</span>[<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">flatten</span>]
|
966
|
-
<span class="ruby-keyword kw">end</span>
|
967
|
-
<span class="ruby-keyword kw">end</span>
|
968
|
-
</pre>
|
969
|
-
</div>
|
970
|
-
</div>
|
971
|
-
</div>
|
972
|
-
<div class="method">
|
973
|
-
<div class="title">
|
974
|
-
<a name="M000472"></a><b>ideal_entropy</b>()
|
975
|
-
</div>
|
976
|
-
<div class="description">
|
977
|
-
<p>
|
978
|
-
Returns the maximum possible Shannon entropy of the array with given size
|
979
|
-
assuming that it is an "order-0" source (each element is selected
|
980
|
-
independently of the next).
|
981
|
-
</p>
|
982
|
-
</div>
|
983
|
-
<div class="sourcecode">
|
984
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000472_source')" id="l_M000472_source">show source</a> ]</p>
|
985
|
-
<div id="M000472_source" class="dyn-source">
|
986
|
-
<pre>
|
987
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/ideal_entropy.rb, line 13</span>
|
988
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ideal_entropy</span>
|
989
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
|
990
|
-
<span class="ruby-identifier">unitProb</span> = <span class="ruby-value">1.0</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span>
|
991
|
-
(<span class="ruby-value">-1</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">unitProb</span> <span class="ruby-operator">*</span> <span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">unitProb</span>)<span class="ruby-operator">/</span><span class="ruby-constant">Math</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2</span>.<span class="ruby-identifier">to_f</span>))
|
992
|
-
<span class="ruby-keyword kw">end</span>
|
993
|
-
</pre>
|
994
|
-
</div>
|
995
|
-
</div>
|
996
|
-
</div>
|
997
|
-
<div class="method">
|
998
|
-
<div class="title">
|
999
|
-
<a name="M000504"></a><b>map_if</b>(&b)
|
1000
|
-
</div>
|
1001
|
-
<div class="description">
|
1002
|
-
<p>
|
1003
|
-
Alias for <a href="Enumerable.html#M000503">collect_if</a>
|
1004
|
-
</p>
|
1005
|
-
</div>
|
1006
|
-
</div>
|
1007
|
-
<div class="method">
|
1008
|
-
<div class="title">
|
1009
|
-
<a name="M000481"></a><b>map_with_counter</b>()
|
1010
|
-
</div>
|
1011
|
-
<div class="description">
|
1012
|
-
<p>
|
1013
|
-
Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
|
1014
|
-
</p>
|
1015
|
-
</div>
|
1016
|
-
</div>
|
1017
|
-
<div class="method">
|
1018
|
-
<div class="title">
|
1019
|
-
<a name="M000479"></a><b>map_with_index</b>()
|
1020
|
-
</div>
|
1021
|
-
<div class="description">
|
1022
|
-
<p>
|
1023
|
-
Alias for <a href="Enumerable.html#M000478">collect_with_index</a>
|
1024
|
-
</p>
|
1025
|
-
</div>
|
1026
|
-
</div>
|
1027
|
-
<div class="method">
|
1028
|
-
<div class="title">
|
1029
|
-
<a name="M000506"></a><b>mode</b>()
|
1030
|
-
</div>
|
1031
|
-
<div class="description">
|
1032
|
-
<p>
|
1033
|
-
In Statistics mode is the value that occurs most frequently in a given set
|
1034
|
-
of data.
|
1035
|
-
</p>
|
1036
|
-
</div>
|
1037
|
-
<div class="sourcecode">
|
1038
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000506_source')" id="l_M000506_source">show source</a> ]</p>
|
1039
|
-
<div id="M000506_source" class="dyn-source">
|
1040
|
-
<pre>
|
1041
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/mode.rb, line 7</span>
|
1042
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mode</span>
|
1043
|
-
<span class="ruby-identifier">count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
1044
|
-
<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">count</span>[<span class="ruby-identifier">x</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span> }
|
1045
|
-
<span class="ruby-identifier">count</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span><span class="ruby-identifier">v</span>}.<span class="ruby-identifier">last</span>[<span class="ruby-value">0</span>]
|
1046
|
-
<span class="ruby-keyword kw">end</span>
|
1047
|
-
</pre>
|
1048
|
-
</div>
|
1049
|
-
</div>
|
1050
|
-
</div>
|
1051
|
-
<div class="method">
|
1052
|
-
<div class="title">
|
1053
|
-
<a name="M000488"></a><b>none?</b>( {|e| ...}
|
1054
|
-
</div>
|
1055
|
-
<div class="description">
|
1056
|
-
<p>
|
1057
|
-
Enumerable#none? is the logical opposite of the builtin method
|
1058
|
-
Enumerable#any?. It returns <tt>true</tt> if and only if <em>none</em> of
|
1059
|
-
the elements in the collection satisfy the predicate.
|
1060
|
-
</p>
|
1061
|
-
<p>
|
1062
|
-
If no predicate is provided, Enumerable#none? returns <tt>true</tt> if and
|
1063
|
-
only if <em>none</em> of the elements have a true value (i.e. not
|
1064
|
-
<tt>nil</tt> or <tt>false</tt>).
|
1065
|
-
</p>
|
1066
|
-
<pre>
|
1067
|
-
[].none? # true
|
1068
|
-
[nil].none? # true
|
1069
|
-
[5,8,9].none? # false
|
1070
|
-
(1...10).none? { |n| n < 0 } # true
|
1071
|
-
(1...10).none? { |n| n > 0 } # false
|
1072
|
-
</pre>
|
1073
|
-
</div>
|
1074
|
-
<div class="sourcecode">
|
1075
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000488_source')" id="l_M000488_source">show source</a> ]</p>
|
1076
|
-
<div id="M000488_source" class="dyn-source">
|
1077
|
-
<pre>
|
1078
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/none.rb, line 20</span>
|
1079
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">none?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
1080
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1081
|
-
<span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">e</span> }
|
1082
|
-
<span class="ruby-keyword kw">else</span>
|
1083
|
-
<span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">any?</span>
|
1084
|
-
<span class="ruby-keyword kw">end</span>
|
1085
|
-
<span class="ruby-keyword kw">end</span>
|
1086
|
-
</pre>
|
1087
|
-
</div>
|
1088
|
-
</div>
|
1089
|
-
</div>
|
1090
|
-
<div class="method">
|
1091
|
-
<div class="title">
|
1092
|
-
<a name="M000475"></a><b>nonuniq</b>()
|
1093
|
-
</div>
|
1094
|
-
<div class="sourcecode">
|
1095
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000475_source')" id="l_M000475_source">show source</a> ]</p>
|
1096
|
-
<div id="M000475_source" class="dyn-source">
|
1097
|
-
<pre>
|
1098
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 7</span>
|
1099
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq</span>
|
1100
|
-
<span class="ruby-identifier">h1</span> = {}
|
1101
|
-
<span class="ruby-identifier">h2</span> = {}
|
1102
|
-
<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1103
|
-
<span class="ruby-identifier">h2</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>]
|
1104
|
-
<span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
|
1105
|
-
}
|
1106
|
-
<span class="ruby-identifier">h2</span>.<span class="ruby-identifier">keys</span>
|
1107
|
-
<span class="ruby-keyword kw">end</span>
|
1108
|
-
</pre>
|
1109
|
-
</div>
|
1110
|
-
</div>
|
1111
|
-
</div>
|
1112
|
-
<div class="method">
|
1113
|
-
<div class="title">
|
1114
|
-
<a name="M000476"></a><b>nonuniq!</b>()
|
1115
|
-
</div>
|
1116
|
-
<div class="sourcecode">
|
1117
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000476_source')" id="l_M000476_source">show source</a> ]</p>
|
1118
|
-
<div id="M000476_source" class="dyn-source">
|
1119
|
-
<pre>
|
1120
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 17</span>
|
1121
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq!</span>
|
1122
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:replace</span>)
|
1123
|
-
<span class="ruby-identifier">h1</span> = {}
|
1124
|
-
<span class="ruby-identifier">h2</span> = {}
|
1125
|
-
<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1126
|
-
<span class="ruby-identifier">h2</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>]
|
1127
|
-
<span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
|
1128
|
-
}
|
1129
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">h2</span>.<span class="ruby-identifier">keys</span>)
|
1130
|
-
<span class="ruby-keyword kw">end</span>
|
1131
|
-
</pre>
|
1132
|
-
</div>
|
1133
|
-
</div>
|
1134
|
-
</div>
|
1135
|
-
<div class="method">
|
1136
|
-
<div class="title">
|
1137
|
-
<a name="M000495"></a><b>occur</b>(n=nil) {|| ...}
|
1138
|
-
</div>
|
1139
|
-
<div class="description">
|
1140
|
-
<p>
|
1141
|
-
Returns an array of elements for the elements that occur n times. Or
|
1142
|
-
according to the results of a given block.
|
1143
|
-
</p>
|
1144
|
-
<pre>
|
1145
|
-
[1,1,2,3,3,4,5,5].occur(1) #=> [2,4]
|
1146
|
-
[1,1,2,3,3,4,5,5].occur(2) #=> [1,3,5]
|
1147
|
-
[1,1,2,3,3,4,5,5].occur(3) #=> []
|
1148
|
-
|
1149
|
-
[1,2,2,3,3,3].occur(1..1) #=> [1]
|
1150
|
-
[1,2,2,3,3,3].occur(2..3) #=> [2,3]
|
1151
|
-
|
1152
|
-
[1,1,2,3,3,4,5,5].occur { |n| n == 1 } #=> [2,4]
|
1153
|
-
[1,1,2,3,3,4,5,5].occur { |n| n > 1 } #=> [1,3,5]
|
1154
|
-
</pre>
|
1155
|
-
</div>
|
1156
|
-
<div class="sourcecode">
|
1157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000495_source')" id="l_M000495_source">show source</a> ]</p>
|
1158
|
-
<div id="M000495_source" class="dyn-source">
|
1159
|
-
<pre>
|
1160
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/occur.rb, line 17</span>
|
1161
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">occur</span>(<span class="ruby-identifier">n</span>=<span class="ruby-keyword kw">nil</span>) <span class="ruby-comment cmt">#:yield:</span>
|
1162
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span> }
|
1163
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
1164
|
-
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">item</span>
|
1165
|
-
<span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">item</span>
|
1166
|
-
<span class="ruby-keyword kw">end</span>
|
1167
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1168
|
-
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>) }
|
1169
|
-
<span class="ruby-keyword kw">else</span>
|
1170
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">n</span>
|
1171
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Range</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">n</span>
|
1172
|
-
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>) }
|
1173
|
-
<span class="ruby-keyword kw">else</span>
|
1174
|
-
<span class="ruby-identifier">result</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">values</span><span class="ruby-operator">|</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">n</span> }
|
1175
|
-
<span class="ruby-keyword kw">end</span>
|
1176
|
-
<span class="ruby-keyword kw">end</span>
|
1177
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
|
1178
|
-
<span class="ruby-keyword kw">end</span>
|
1179
|
-
</pre>
|
1180
|
-
</div>
|
1181
|
-
</div>
|
1182
|
-
</div>
|
1183
|
-
<div class="method">
|
1184
|
-
<div class="title">
|
1185
|
-
<a name="M000487"></a><b>one?</b>( {|e| ...}
|
1186
|
-
</div>
|
1187
|
-
<div class="description">
|
1188
|
-
<p>
|
1189
|
-
Enumerable#one? returns <tt>true</tt> if and only if <em>exactly one</em>
|
1190
|
-
element in the collection satisfies the given predicate.
|
1191
|
-
</p>
|
1192
|
-
<p>
|
1193
|
-
If no predicate is provided, Enumerable#one? returns <tt>true</tt> if and
|
1194
|
-
only if <em>exactly one</em> element has a true value (i.e. not
|
1195
|
-
<tt>nil</tt> or <tt>false</tt>).
|
1196
|
-
</p>
|
1197
|
-
<pre>
|
1198
|
-
[].one? # false
|
1199
|
-
[nil].one? # false
|
1200
|
-
[5].one? # true
|
1201
|
-
[5,8,9].one? # false
|
1202
|
-
(1...10).one? { |n| n == 5 } # true
|
1203
|
-
(1...10).one? { |n| n < 5 } # false
|
1204
|
-
</pre>
|
1205
|
-
</div>
|
1206
|
-
<div class="sourcecode">
|
1207
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000487_source')" id="l_M000487_source">show source</a> ]</p>
|
1208
|
-
<div id="M000487_source" class="dyn-source">
|
1209
|
-
<pre>
|
1210
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/one.rb, line 20</span>
|
1211
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
1212
|
-
<span class="ruby-identifier">matches</span> = <span class="ruby-value">0</span>
|
1213
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1214
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
1215
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>)
|
1216
|
-
<span class="ruby-identifier">matches</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1217
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">matches</span> <span class="ruby-operator">></span> <span class="ruby-value">1</span>
|
1218
|
-
<span class="ruby-keyword kw">end</span>
|
1219
|
-
<span class="ruby-keyword kw">end</span>
|
1220
|
-
<span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">matches</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>)
|
1221
|
-
<span class="ruby-keyword kw">else</span>
|
1222
|
-
<span class="ruby-identifier">one?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> }
|
1223
|
-
<span class="ruby-keyword kw">end</span>
|
1224
|
-
<span class="ruby-keyword kw">end</span>
|
1225
|
-
</pre>
|
1226
|
-
</div>
|
1227
|
-
</div>
|
1228
|
-
</div>
|
1229
|
-
<div class="method">
|
1230
|
-
<div class="title">
|
1231
|
-
<a name="M000474"></a><b>partition_by</b>( {|| ...}
|
1232
|
-
</div>
|
1233
|
-
<div class="description">
|
1234
|
-
<p>
|
1235
|
-
See Enumerable#partition for the background. <a
|
1236
|
-
href="Enumerable.html#M000474">partition_by</a> is best explained by
|
1237
|
-
example.
|
1238
|
-
</p>
|
1239
|
-
<pre>
|
1240
|
-
(1..5).partition_by { |n| n % 3 }
|
1241
|
-
#=> { 0 => [3], 1 => [1, 4], 2 => [2,5] }
|
1242
|
-
|
1243
|
-
["I had", 1, "dollar and", 50, "cents"].partition_by { |e| e.class }
|
1244
|
-
#=> { String => ["I had","dollar and","cents"], Fixnum => [1,50] }
|
1245
|
-
</pre>
|
1246
|
-
<p>
|
1247
|
-
<a href="Enumerable.html#M000474">partition_by</a> is used to group items
|
1248
|
-
in a collection by something they have in common. The common factor is the
|
1249
|
-
key in the resulting hash, the array of like elements is the value.
|
1250
|
-
</p>
|
1251
|
-
</div>
|
1252
|
-
<div class="sourcecode">
|
1253
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000474_source')" id="l_M000474_source">show source</a> ]</p>
|
1254
|
-
<div id="M000474_source" class="dyn-source">
|
1255
|
-
<pre>
|
1256
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/partition_by.rb, line 19</span>
|
1257
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partition_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
1258
|
-
<span class="ruby-identifier">result</span> = {}
|
1259
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
1260
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">e</span>
|
1261
|
-
(<span class="ruby-identifier">result</span>[<span class="ruby-identifier">value</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator"><<</span> <span class="ruby-identifier">e</span>
|
1262
|
-
<span class="ruby-keyword kw">end</span>
|
1263
|
-
<span class="ruby-identifier">result</span>
|
1264
|
-
<span class="ruby-keyword kw">end</span>
|
1265
|
-
</pre>
|
1266
|
-
</div>
|
1267
|
-
</div>
|
1268
|
-
</div>
|
1269
|
-
<div class="method">
|
1270
|
-
<div class="title">
|
1271
|
-
<a name="M000493"></a><b>permutation_number</b>(original_array=self.to_a.sort)
|
1272
|
-
</div>
|
1273
|
-
<div class="sourcecode">
|
1274
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000493_source')" id="l_M000493_source">show source</a> ]</p>
|
1275
|
-
<div id="M000493_source" class="dyn-source">
|
1276
|
-
<pre>
|
1277
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 22</span>
|
1278
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">permutation_number</span>(<span class="ruby-identifier">original_array</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">sort</span>)
|
1279
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
1280
|
-
<span class="ruby-identifier">m</span> = <span class="ruby-value">1</span>
|
1281
|
-
<span class="ruby-identifier">v</span> = <span class="ruby-value">0</span>
|
1282
|
-
<span class="ruby-identifier">last_indicies</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
1283
|
-
<span class="ruby-identifier">original_array</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1284
|
-
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span><span class="ruby-operator">==</span><span class="ruby-value">0</span>
|
1285
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">*=</span> <span class="ruby-identifier">i</span>
|
1286
|
-
<span class="ruby-identifier">done</span> = <span class="ruby-identifier">original_array</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-identifier">i</span>]
|
1287
|
-
<span class="ruby-identifier">v</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">y</span><span class="ruby-operator">|</span> <span class="ruby-identifier">done</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">y</span>)}.<span class="ruby-identifier">rindex</span>(<span class="ruby-identifier">x</span>)
|
1288
|
-
}
|
1289
|
-
<span class="ruby-identifier">v</span>
|
1290
|
-
<span class="ruby-keyword kw">end</span>
|
1291
|
-
</pre>
|
1292
|
-
</div>
|
1293
|
-
</div>
|
1294
|
-
</div>
|
1295
|
-
<div class="method">
|
1296
|
-
<div class="title">
|
1297
|
-
<a name="M000492"></a><b>permute</b>(number)
|
1298
|
-
</div>
|
1299
|
-
<div class="sourcecode">
|
1300
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000492_source')" id="l_M000492_source">show source</a> ]</p>
|
1301
|
-
<div id="M000492_source" class="dyn-source">
|
1302
|
-
<pre>
|
1303
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 6</span>
|
1304
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">permute</span>(<span class="ruby-identifier">number</span>)
|
1305
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
1306
|
-
<span class="ruby-identifier">out</span> = <span class="ruby-identifier">arr</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">0</span>]
|
1307
|
-
<span class="ruby-identifier">nextfactor</span> = <span class="ruby-identifier">factor</span> = <span class="ruby-value">1</span>
|
1308
|
-
<span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each_with_index</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1309
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
|
1310
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span><span class="ruby-operator">:</span> <span class="ruby-keyword kw">next</span>
|
1311
|
-
<span class="ruby-keyword kw">else</span>
|
1312
|
-
<span class="ruby-identifier">nextfactor</span> = <span class="ruby-identifier">factor</span> <span class="ruby-operator">*</span> (<span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
|
1313
|
-
<span class="ruby-identifier">out</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">number</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">nextfactor</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">factor</span>, <span class="ruby-identifier">x</span>)
|
1314
|
-
<span class="ruby-identifier">factor</span> = <span class="ruby-identifier">nextfactor</span>
|
1315
|
-
<span class="ruby-keyword kw">end</span>
|
1316
|
-
}
|
1317
|
-
<span class="ruby-identifier">out</span>
|
1318
|
-
<span class="ruby-keyword kw">end</span>
|
1319
|
-
</pre>
|
1320
|
-
</div>
|
1321
|
-
</div>
|
1322
|
-
</div>
|
1323
|
-
<div class="method">
|
1324
|
-
<div class="title">
|
1325
|
-
<a name="M000477"></a><b>probability</b>()
|
1326
|
-
</div>
|
1327
|
-
<div class="description">
|
1328
|
-
<p>
|
1329
|
-
Generates a hash mapping each unique symbol in the array to the relative
|
1330
|
-
frequency, i.e. the probablity, of it appearence.
|
1331
|
-
</p>
|
1332
|
-
</div>
|
1333
|
-
<div class="sourcecode">
|
1334
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000477_source')" id="l_M000477_source">show source</a> ]</p>
|
1335
|
-
<div id="M000477_source" class="dyn-source">
|
1336
|
-
<pre>
|
1337
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/probability.rb, line 10</span>
|
1338
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">probability</span>
|
1339
|
-
<span class="ruby-identifier">probs</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span><span class="ruby-value">.0</span>)
|
1340
|
-
<span class="ruby-identifier">size</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
1341
|
-
<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">e</span> <span class="ruby-operator">|</span>
|
1342
|
-
<span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
|
1343
|
-
<span class="ruby-identifier">size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
|
1344
|
-
<span class="ruby-keyword kw">end</span>
|
1345
|
-
<span class="ruby-identifier">probs</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">/=</span> <span class="ruby-identifier">size</span> }
|
1346
|
-
<span class="ruby-identifier">probs</span>
|
1347
|
-
<span class="ruby-keyword kw">end</span>
|
1348
|
-
</pre>
|
1349
|
-
</div>
|
1350
|
-
</div>
|
1351
|
-
</div>
|
1352
|
-
<div class="method">
|
1353
|
-
<div class="title">
|
1354
|
-
<a name="M000489"></a><b>project</b>(&block)
|
1355
|
-
</div>
|
1356
|
-
<div class="sourcecode">
|
1357
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000489_source')" id="l_M000489_source">show source</a> ]</p>
|
1358
|
-
<div id="M000489_source" class="dyn-source">
|
1359
|
-
<pre>
|
1360
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/project.rb, line 7</span>
|
1361
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">project</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1362
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) }
|
1363
|
-
<span class="ruby-keyword kw">end</span>
|
1364
|
-
</pre>
|
1365
|
-
</div>
|
1366
|
-
</div>
|
1367
|
-
</div>
|
1368
|
-
<div class="method">
|
1369
|
-
<div class="title">
|
1370
|
-
<a name="M000482"></a><b>to_h</b>( &blk )
|
1371
|
-
</div>
|
1372
|
-
<div class="description">
|
1373
|
-
<p>
|
1374
|
-
Produces a hash from an <a href="Enumerable.html">Enumerable</a> with index
|
1375
|
-
for keys.
|
1376
|
-
</p>
|
1377
|
-
<pre>
|
1378
|
-
enu = 'a'..'b'
|
1379
|
-
enu.to_h #=> { 0=>'a', 1=>'b' }
|
1380
|
-
</pre>
|
1381
|
-
<p>
|
1382
|
-
If a block is passed, the hash values will be set by calling the block with
|
1383
|
-
the enumerated element and it’s counter.
|
1384
|
-
</p>
|
1385
|
-
<pre>
|
1386
|
-
enu = 'a'..'b'
|
1387
|
-
enu.to_h{ |e,i| e } #=> { 0=>'a', 1=>'b' }
|
1388
|
-
</pre>
|
1389
|
-
<p>
|
1390
|
-
See also <a href="Enumerable.html#M000469">graph</a>.
|
1391
|
-
</p>
|
1392
|
-
</div>
|
1393
|
-
<div class="sourcecode">
|
1394
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000482_source')" id="l_M000482_source">show source</a> ]</p>
|
1395
|
-
<div id="M000482_source" class="dyn-source">
|
1396
|
-
<pre>
|
1397
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/to_h.rb, line 18</span>
|
1398
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1399
|
-
<span class="ruby-identifier">h</span> = {}
|
1400
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1401
|
-
<span class="ruby-identifier">each_with_index</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span>) }
|
1402
|
-
<span class="ruby-keyword kw">else</span>
|
1403
|
-
<span class="ruby-identifier">each_with_index</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">e</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-identifier">e</span> }
|
1404
|
-
<span class="ruby-keyword kw">end</span>
|
1405
|
-
<span class="ruby-identifier">h</span>
|
1406
|
-
<span class="ruby-keyword kw">end</span>
|
1407
|
-
</pre>
|
1408
|
-
</div>
|
1409
|
-
</div>
|
1410
|
-
</div>
|
1411
|
-
<div class="method">
|
1412
|
-
<div class="title">
|
1413
|
-
<a name="M000500"></a><b>uniq_by</b>( {|| ...}
|
1414
|
-
</div>
|
1415
|
-
<div class="description">
|
1416
|
-
<p>
|
1417
|
-
Like uniq, but determines uniqueness based on a given block.
|
1418
|
-
</p>
|
1419
|
-
<pre>
|
1420
|
-
(-5..5).to_a.uniq_by {|i| i*i }
|
1421
|
-
</pre>
|
1422
|
-
<p>
|
1423
|
-
produces
|
1424
|
-
</p>
|
1425
|
-
<pre>
|
1426
|
-
[-5, -4, -3, -2, -1, 0]
|
1427
|
-
</pre>
|
1428
|
-
</div>
|
1429
|
-
<div class="sourcecode">
|
1430
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000500_source')" id="l_M000500_source">show source</a> ]</p>
|
1431
|
-
<div id="M000500_source" class="dyn-source">
|
1432
|
-
<pre>
|
1433
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/uniq_by.rb, line 12</span>
|
1434
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uniq_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
1435
|
-
<span class="ruby-identifier">h</span> = {}; <span class="ruby-identifier">inject</span>([]) {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">x</span>)] <span class="ruby-operator">||=</span> <span class="ruby-identifier">a</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">x</span>}
|
1436
|
-
<span class="ruby-keyword kw">end</span>
|
1437
|
-
</pre>
|
1438
|
-
</div>
|
1439
|
-
</div>
|
1440
|
-
</div>
|
1441
|
-
<div class="method">
|
1442
|
-
<div class="title">
|
1443
|
-
<a name="M000473"></a><b>where</b>(&block)
|
1444
|
-
</div>
|
1445
|
-
<div class="sourcecode">
|
1446
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000473_source')" id="l_M000473_source">show source</a> ]</p>
|
1447
|
-
<div id="M000473_source" class="dyn-source">
|
1448
|
-
<pre>
|
1449
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/where.rb, line 7</span>
|
1450
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">where</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1451
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">select</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) }
|
1452
|
-
<span class="ruby-keyword kw">end</span>
|
1453
|
-
</pre>
|
1454
|
-
</div>
|
1455
|
-
</div>
|
1456
|
-
</div>
|
1457
|
-
</div>
|
1458
|
-
|
1459
|
-
</div>
|
1460
|
-
|
1461
|
-
</body>
|
1462
|
-
</html>
|