facets 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/{test/FIXTURE → FIXTURE}/filelist/testfile.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/filelist/testfile2.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A/B.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/ls_r/A/B/C.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/test_file.txt +0 -0
- data/{test/FIXTURE → FIXTURE}/test_file2.txt +0 -0
- data/ProjectInfo +15 -2
- data/Reapfile +1 -1
- data/data/roll/facets/Libspec +17 -0
- data/forge/core/class/to_module.rb +3 -0
- data/forge/core/module/inherit.rb +79 -39
- data/forge/core/module/inherit0.rb +59 -0
- data/forge/core/module/to_module.rb +37 -0
- data/{lib/facets → forge}/core/string/frequency.rb +1 -0
- data/{lib/facets → forge}/core/string/probability.rb +1 -0
- data/forge/core/string/to_arr.rb +57 -0
- data/forge/more/capsule2.rb +152 -0
- data/{lib/facets → forge}/more/classinherit.rb +0 -2
- data/forge/more/clean.rb +35 -0
- data/forge/more/codepack.rb +16 -10
- data/lib/facet/command.rb +1 -0
- data/lib/facet/config/datadir.rb +1 -0
- data/lib/facet/file/self/rootname.rb +1 -0
- data/lib/facet/kernel/__callee__.rb +1 -0
- data/lib/facet/kernel/__method__.rb +1 -0
- data/lib/facet/kernel/quaclass.rb +1 -0
- data/lib/facet/kernel/singleton_class.rb +1 -0
- data/lib/facet/module/class_extension.rb +1 -0
- data/lib/facets/core/config/datadir.rb +20 -0
- data/lib/facets/core/file/self/rootname.rb +22 -0
- data/lib/facets/core/hash/to_ostruct_recurse.rb +4 -0
- data/lib/facets/core/kernel/__callee__.rb +2 -0
- data/lib/facets/core/kernel/__method__.rb +45 -0
- data/lib/facets/core/kernel/quaclass.rb +36 -0
- data/lib/facets/core/kernel/singleton_class.rb +36 -0
- data/lib/facets/core/module/class_extension.rb +153 -0
- data/lib/facets/core/symbol/to_proc.rb +12 -3
- data/lib/facets/more/annattr.rb +1 -0
- data/lib/facets/more/annotation.rb +12 -9
- data/lib/facets/more/basicobject.rb +8 -0
- data/lib/facets/more/classmethods.rb +17 -20
- data/lib/facets/more/command.rb +307 -0
- data/lib/facets/more/inheritor.rb +7 -3
- data/lib/facets/more/tuple.rb +61 -13
- data/lib/facets/more/typecast.rb +59 -58
- data/note/CHANGELOG +13 -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_keys_to_s.rb +1 -1
- data/test/lib/facets/core/hash/test_keys_to_sym.rb +1 -1
- 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_swap.rb +1 -1
- data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
- 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_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 +26 -0
- 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_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_generate_method_name.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_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 +27 -0
- 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 +27 -0
- 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_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/{more/test_classinherit.rb → core/module/test_class_extension.rb} +13 -8
- 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_generate_instance_method_name.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_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 -1
- data/test/lib/facets/core/proc/test_to_method.rb +1 -1
- 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_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 +1 -1
- 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 +8 -2
- 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 +1 -1
- 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_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 +8 -4
- data/test/lib/facets/more/test_command.rb +38 -0
- 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_dictionary.rb +1 -1
- data/test/lib/facets/more/test_elementor.rb +1 -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_inheritor.rb +1 -1
- 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_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 +1 -1
- data/test/lib/facets/more/test_openobject.rb +1 -1
- 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_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 +10 -2
- data/test/lib/facets/more/test_typecast.rb +7 -4
- 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 +1660 -2489
- data/lib/facet/classinherit.rb +0 -1
- data/lib/facet/consoleapp.rb +0 -1
- data/lib/facet/gem/self/gemdir.rb +0 -1
- data/lib/facet/kernel/me.rb +0 -1
- data/lib/facet/kernel/method_name.rb +0 -1
- data/lib/facet/kernel/methodname.rb +0 -1
- data/lib/facet/module/inherit.rb +0 -1
- data/lib/facet/module/singleton_to_module.rb +0 -1
- data/lib/facet/string/frequency.rb +0 -1
- data/lib/facet/string/probability.rb +0 -1
- data/lib/facets/core/gem/self/gemdir.rb +0 -12
- data/lib/facets/core/kernel/me.rb +0 -18
- data/lib/facets/core/kernel/method_name.rb +0 -2
- data/lib/facets/core/kernel/methodname.rb +0 -49
- data/lib/facets/core/module/inherit.rb +0 -70
- data/lib/facets/core/module/singleton_to_module.rb +0 -23
- data/lib/facets/more/consoleapp.rb +0 -167
- data/test/lib/facets/core/kernel/test_methodname.rb +0 -31
- data/test/lib/facets/core/module/test_inherit.rb +0 -58
- data/test/lib/facets/core/string/test_frequency.rb +0 -28
- data/test/lib/facets/core/string/test_probability.rb +0 -28
- data/test/lib/facets/more/test_annotatedattr.rb +0 -39
- data/web/doc/api/core/classes/Array.html +0 -1356
- data/web/doc/api/core/classes/Binding.html +0 -538
- data/web/doc/api/core/classes/Class.html +0 -475
- data/web/doc/api/core/classes/Comparable.html +0 -231
- data/web/doc/api/core/classes/Continuation.html +0 -168
- data/web/doc/api/core/classes/Date.html +0 -219
- data/web/doc/api/core/classes/Dir.html +0 -208
- data/web/doc/api/core/classes/Enumerable.html +0 -1435
- data/web/doc/api/core/classes/FalseClass.html +0 -115
- data/web/doc/api/core/classes/File.html +0 -349
- data/web/doc/api/core/classes/FileUtils.html +0 -468
- data/web/doc/api/core/classes/Float.html +0 -157
- data/web/doc/api/core/classes/Gem.html +0 -171
- data/web/doc/api/core/classes/Hash.html +0 -1657
- data/web/doc/api/core/classes/Integer.html +0 -353
- data/web/doc/api/core/classes/Kernal.html +0 -86
- data/web/doc/api/core/classes/Kernel.html +0 -1972
- data/web/doc/api/core/classes/Logger.html +0 -157
- data/web/doc/api/core/classes/MatchData.html +0 -195
- data/web/doc/api/core/classes/Module.html +0 -1712
- data/web/doc/api/core/classes/NackClass.html +0 -92
- data/web/doc/api/core/classes/NilClass.html +0 -332
- data/web/doc/api/core/classes/Numeric.html +0 -306
- data/web/doc/api/core/classes/Object.html +0 -332
- data/web/doc/api/core/classes/OpenStruct.html +0 -315
- data/web/doc/api/core/classes/Pathname.html +0 -154
- data/web/doc/api/core/classes/Proc.html +0 -154
- data/web/doc/api/core/classes/Range.html +0 -235
- data/web/doc/api/core/classes/Regexp.html +0 -185
- data/web/doc/api/core/classes/ScriptBug.html +0 -92
- data/web/doc/api/core/classes/String.html +0 -3286
- data/web/doc/api/core/classes/Symbol.html +0 -463
- data/web/doc/api/core/classes/Time.html +0 -307
- data/web/doc/api/core/classes/TrueClass.html +0 -115
- data/web/doc/api/core/classes/UnboundMethod.html +0 -121
- data/web/doc/api/core/created.rid +0 -1
- data/web/doc/api/core/files/AUTHORS.html +0 -206
- data/web/doc/api/core/files/COPYING.html +0 -517
- data/web/doc/api/core/files/README.html +0 -386
- data/web/doc/api/core/files/WARNING.html +0 -151
- data/web/doc/api/core/files/lib/facets/core/all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/at_rand_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/body_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/delete_unless_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/delete_values_at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/delete_values_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/each_with_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/first_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/foot_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/head_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/join_sentence_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/last_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/last_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/merge_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/mid_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/middle_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_fetch_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_mod_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/op_store_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/array/pick_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pos_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pot_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/pull_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rand_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rand_subset_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/rotate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/select_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/shuffle_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/store_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/tail_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/array/thru_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/to_hash_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/array/unzip_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/binding/__DIR___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/binding/__FILE___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/binding/__LINE___rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/call_stack_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/called_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/caller_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/defined_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/eval_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/binding/local_variables_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/method_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/op_fetch_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/op_store_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/binding/self/of_caller_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding/self_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/binding_rb.html +0 -109
- data/web/doc/api/core/files/lib/facets/core/class/by_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/class/cattr_accessor_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/cattr_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/cattr_reader_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/cattr_writer_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/descendents_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/class/remove_descendents_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/class/remove_subclasses_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/subclasses_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/class/to_proc_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/class/unix_path_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/at_least_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/at_most_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/comparable/cap_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/comparable/clip_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/comparable/cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/continuation/self/create_rb.html +0 -148
- data/web/doc/api/core/files/lib/facets/core/date/days_in_month_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/days_of_month_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/stamp_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_date_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_s_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/date/to_time_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/dir/self/ancestor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/ascend_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/descend_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/ls_r_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/dir/self/recurse_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/accumulate_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_if_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_with_counter_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/collect_with_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/commonality_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/compact_collect_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/compact_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/count_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/cross_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_by_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_combination_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_pair_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_permutation_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_slice_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_unique_pair_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/each_with_counter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/elementwise_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/entropy_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/enumerable/every_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/ew_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/filter_collect_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/filter_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/find_collisions_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/frequency_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/graph_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/ideal_entropy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_if_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_with_counter_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/map_with_index_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/enumerable/mode_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/none_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/nonuniq_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/occur_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/one_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/op_pow_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/partition_by_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/permute_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/probability_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/project_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/self/combinations_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/self/cross_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/enumerable/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/uniq_by_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/enumerable/where_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/file/self/append_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/create_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/file/self/open_as_string_rb.html +0 -118
- data/web/doc/api/core/files/lib/facets/core/file/self/read_binary_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/read_list_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/file/self/sanitize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/file/self/split_all_rb.html +0 -101
- data/web/doc/api/core/files/lib/facets/core/file/self/write_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/head_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/fileutils/safe_ln_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/slice_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/split_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/fileutils/tail_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/fileutils/wc_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/whereis_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/fileutils/which_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/float/approx_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/float/round_at_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/float/round_off_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/float/round_to_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/active_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/gem/self/gemdir_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/gempath_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/gem/self/gemspec_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/alias_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/assert_has_keys_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/assert_has_only_keys_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/collate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/delete_unless_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/each_with_index_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/hash/each_with_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/graph_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/has_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/has_only_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/inverse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/join_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_iv_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_s_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/keys_to_sym_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/op_fetch_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/op_lshift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/op_store_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/rand_key_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/rand_pair_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/rand_value_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/replace_each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/self/zipnew_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/shuffle_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/slice_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/stringify_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/swap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/swapkey_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/symoblize_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/to_ostruct_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/hash/to_ostruct_recurse_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/hash/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/traverse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_each_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_keys_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/update_values_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/hash/variablize_keys_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/hash/weave_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/inflect_rb.html +0 -117
- data/web/doc/api/core/files/lib/facets/core/integer/even_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/fac_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/fact_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/factorial_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/multiple_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/odd_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/integer/ordinal_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/times_collect_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/integer/times_map_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/__DIR___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__class___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__get___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/__self___rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/__set___rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/adhoc_rb.html +0 -99
- data/web/doc/api/core/files/lib/facets/core/kernel/as_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/assign_from_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/assign_with_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_files_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_glob_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/autoreload_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/bool_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/bug_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/cache_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/call_stack_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/called_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/complete_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/constant_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/copy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/deep_copy_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/demo_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/eigenclass_rb.html +0 -103
- data/web/doc/api/core/files/lib/facets/core/kernel/false_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/fn_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/generate_method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/get_by_id_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/here_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/in_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/instance_assign_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/instvar_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/is_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/maybe_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/me_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/metaclass_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/method_name_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/methodname_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/methods_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/nack_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/kernel/new_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/object_class_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/object_hexid_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/op_esc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/own_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/p_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/pp_exception_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/require_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/require_esc_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/require_facet_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/require_local_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/resc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/respond_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/returning_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/send_as_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/set_from_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/set_with_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/silence_warnings_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/silently_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/singleton_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/superior_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/supermethod_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/this_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/to_bool_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/true_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/unuri_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/uri_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/kernel/val_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/warn_with_line_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/with_accessor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/kernel/with_reader_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/kernel/with_writer_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/logger/format_message_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/logger/format_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/matchdata/match_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/matchdata/matchset_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/matchdata/matchtree_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/abstract_rb.html +0 -105
- data/web/doc/api/core/files/lib/facets/core/module/alias_module_function_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/ancestor_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_query_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/attr_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_setter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/attr_tester_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/attr_validator_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/basename_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/by_name_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/class_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/clone_removing_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/clone_renaming_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/clone_using_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/dirname_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/equate_on_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/generate_instance_method_name_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/include_as_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/inherit_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/initializer_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/instance_methods_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/integrate_rb.html +0 -104
- data/web/doc/api/core/files/lib/facets/core/module/is_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/memoize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/modspace_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/module/namespace_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/nesting_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/nodef_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/on_included_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redef_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/redefine_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redirect_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/redirect_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/remove_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/rename_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/rename_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/revisal_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/module/shadow_all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/shadow_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/singleton_to_module_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/sort_on_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/this_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/module/wrap_method_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/module/wrap_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/nil_as_emptiness_rb.html +0 -116
- data/web/doc/api/core/files/lib/facets/core/nilclass/blank_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/empty_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/include_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/length_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/nilclass/op_cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/op_fetch_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/size_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/nilclass/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/approx_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/ceil_multiple_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/pred_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/numeric/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/numeric/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct/__merge___rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/ostruct/__table___rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct/__update___rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/ostruct/instance_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/op_fetch_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/op_store_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/ostruct/to_h_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/ostruct_rb.html +0 -102
- data/web/doc/api/core/files/lib/facets/core/pathname/ascend_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/pathname/descend_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/proc/compose_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/proc/op_mul_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/proc/to_method_rb.html +0 -133
- data/web/doc/api/core/files/lib/facets/core/random_rb.html +0 -111
- data/web/doc/api/core/files/lib/facets/core/range/to_r_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/to_range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/umbrella_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/range/within_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/regexp/arity_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/regexp/to_re_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/regexp/to_regexp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/align_center_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/align_left_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/align_right_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/at_rand_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/at_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/basename_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/blank_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/bracket_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/brief_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/bytes_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/camelcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/camelize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/capitalized_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/chars_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/cmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/demodulize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/dequote_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/downcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/dresner_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/each_char_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/each_word_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/ends_with_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/first_char_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/first_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/fold_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/format_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/frequency_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/humanize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/indent_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/index_all_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/last_char_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/last_rb.html +0 -98
- data/web/doc/api/core/files/lib/facets/core/string/line_wrap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/lines_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/lowercase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/margin_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/methodize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/modulize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/mscan_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/natcmp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/nchar_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/ordinal_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/pathize_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/plural_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/pop_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/pot_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/probability_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/pull_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/push_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/quote_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/rand_byte_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/rand_index_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/range_all_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/range_of_line_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/range_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/regesc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/format_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/interpolate_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/patterns_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/rand_letter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/self/random_rb.html +0 -99
- data/web/doc/api/core/files/lib/facets/core/string/shatter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shell_escape_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/shuffle_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/similarity_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/singular_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/soundex_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/starts_with_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/tab_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/tabto_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/to_a_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_b_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_const_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_date_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/string/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_re_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/to_rx_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/to_time_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/unbracket_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/underscore_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/unix_crypt_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/unpack_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/unshift_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/upcase_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/uppercase_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/string/whitespace_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/string/word_filter_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/word_wrap_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string/words_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/string_as_array_rb.html +0 -109
- data/web/doc/api/core/files/lib/facets/core/symbol/camelcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/camelize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/capitalize_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/capitalized_rb.html +0 -97
- data/web/doc/api/core/files/lib/facets/core/symbol/downcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/not_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/pad_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/succ_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/to_const_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/to_proc_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/to_str_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/symbol/underscore_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/symbol/upcase_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/change_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/elapse_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/self/days_extrema_rb.html +0 -114
- data/web/doc/api/core/files/lib/facets/core/time/self/stamp_rb.html +0 -100
- data/web/doc/api/core/files/lib/facets/core/time/stamp_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/time/to_date_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/to_s_rb.html +0 -96
- data/web/doc/api/core/files/lib/facets/core/time/to_time_rb.html +0 -92
- data/web/doc/api/core/files/lib/facets/core/unboundmethod/name_rb.html +0 -92
- data/web/doc/api/core/fr_class_index.html +0 -80
- data/web/doc/api/core/fr_file_index.html +0 -521
- data/web/doc/api/core/fr_method_index.html +0 -555
- data/web/doc/api/core/index.html +0 -26
- data/web/doc/api/core/rdoc-style.css +0 -175
- data/web/doc/api/more/classes/Annotation.html +0 -258
- data/web/doc/api/more/classes/Array.html +0 -362
- data/web/doc/api/more/classes/Aspect.html +0 -159
- data/web/doc/api/more/classes/Aspects.html +0 -240
- data/web/doc/api/more/classes/Aspects/ClassMethods.html +0 -254
- data/web/doc/api/more/classes/Association.html +0 -289
- data/web/doc/api/more/classes/BBCode.html +0 -531
- data/web/doc/api/more/classes/BasicObject.html +0 -260
- data/web/doc/api/more/classes/BasicObject/Self.html +0 -142
- data/web/doc/api/more/classes/BinaryReader.html +0 -535
- data/web/doc/api/more/classes/BinaryReader/ByteOrder.html +0 -225
- data/web/doc/api/more/classes/BuilderObject.html +0 -248
- data/web/doc/api/more/classes/Class.html +0 -201
- data/web/doc/api/more/classes/Client.html +0 -1251
- data/web/doc/api/more/classes/Cloneable.html +0 -133
- data/web/doc/api/more/classes/Console.html +0 -105
- data/web/doc/api/more/classes/Console/ANSICode.html +0 -488
- data/web/doc/api/more/classes/Console/Command.html +0 -275
- data/web/doc/api/more/classes/Console/ProgressBar.html +0 -640
- data/web/doc/api/more/classes/Coroutine.html +0 -284
- data/web/doc/api/more/classes/Crypt.html +0 -270
- data/web/doc/api/more/classes/DebugSocket.html +0 -242
- data/web/doc/api/more/classes/Dictionary.html +0 -974
- data/web/doc/api/more/classes/Downloader.html +0 -515
- data/web/doc/api/more/classes/Downloader/Checksum.html +0 -96
- data/web/doc/api/more/classes/Downloader/Mirror.html +0 -134
- data/web/doc/api/more/classes/Elementor.html +0 -202
- data/web/doc/api/more/classes/Enumerable.html +0 -86
- data/web/doc/api/more/classes/EnumerablePass.html +0 -217
- data/web/doc/api/more/classes/Expirable.html +0 -197
- data/web/doc/api/more/classes/FalseClass.html +0 -119
- data/web/doc/api/more/classes/FileList.html +0 -971
- data/web/doc/api/more/classes/Float.html +0 -140
- data/web/doc/api/more/classes/FloatString.html +0 -413
- data/web/doc/api/more/classes/Functor.html +0 -203
- data/web/doc/api/more/classes/HTMLBuilder.html +0 -132
- data/web/doc/api/more/classes/HTMLHelper.html +0 -189
- data/web/doc/api/more/classes/HTTP.html +0 -154
- data/web/doc/api/more/classes/HTTP/BadResponseError.html +0 -94
- data/web/doc/api/more/classes/HTTP/Error.html +0 -96
- data/web/doc/api/more/classes/HTTP/Message.html +0 -633
- data/web/doc/api/more/classes/HTTP/Message/Body.html +0 -299
- data/web/doc/api/more/classes/HTTP/Message/Headers.html +0 -641
- data/web/doc/api/more/classes/HTTP/Status.html +0 -148
- data/web/doc/api/more/classes/HTTPAccess.html +0 -115
- data/web/doc/api/more/classes/Hash.html +0 -257
- data/web/doc/api/more/classes/HashBuilder.html +0 -216
- data/web/doc/api/more/classes/Heap.html +0 -535
- data/web/doc/api/more/classes/Heap/EmptyHeapException.html +0 -92
- data/web/doc/api/more/classes/Heap/Max.html +0 -133
- data/web/doc/api/more/classes/Heap/Min.html +0 -133
- data/web/doc/api/more/classes/IORedirect.html +0 -225
- data/web/doc/api/more/classes/Integer.html +0 -298
- data/web/doc/api/more/classes/Interval.html +0 -853
- data/web/doc/api/more/classes/InvalidNackError.html +0 -117
- data/web/doc/api/more/classes/JSON.html +0 -410
- data/web/doc/api/more/classes/JSON/Parser.html +0 -374
- data/web/doc/api/more/classes/JSON/State.html +0 -280
- data/web/doc/api/more/classes/Kernel.html +0 -400
- data/web/doc/api/more/classes/LRUCache.html +0 -461
- data/web/doc/api/more/classes/LRUCache/Item.html +0 -114
- data/web/doc/api/more/classes/LRUCache/Sentinel.html +0 -102
- data/web/doc/api/more/classes/Lazy.html +0 -96
- data/web/doc/api/more/classes/Lazy/Future.html +0 -100
- data/web/doc/api/more/classes/Lazy/Promise.html +0 -114
- data/web/doc/api/more/classes/Lazy/PromiseSafe.html +0 -99
- data/web/doc/api/more/classes/Lisp.html +0 -846
- data/web/doc/api/more/classes/Lisp/DottedPair.html +0 -289
- data/web/doc/api/more/classes/Lisp/Format.html +0 -147
- data/web/doc/api/more/classes/Math.html +0 -110
- data/web/doc/api/more/classes/Math/Constants.html +0 -691
- data/web/doc/api/more/classes/Math/Constants/CGS.html +0 -584
- data/web/doc/api/more/classes/Method.html +0 -170
- data/web/doc/api/more/classes/Method/Probe.html +0 -267
- data/web/doc/api/more/classes/Mock.html +0 -276
- data/web/doc/api/more/classes/Module.html +0 -691
- data/web/doc/api/more/classes/Multiton.html +0 -256
- data/web/doc/api/more/classes/NackClass.html +0 -245
- data/web/doc/api/more/classes/NilClass.html +0 -238
- data/web/doc/api/more/classes/NullClass.html +0 -202
- data/web/doc/api/more/classes/Numeric.html +0 -1104
- data/web/doc/api/more/classes/ORMSupport.html +0 -357
- data/web/doc/api/more/classes/Object.html +0 -323
- data/web/doc/api/more/classes/OpenCascade.html +0 -230
- data/web/doc/api/more/classes/OpenObject.html +0 -552
- data/web/doc/api/more/classes/PQueue.html +0 -471
- data/web/doc/api/more/classes/PathList.html +0 -162
- data/web/doc/api/more/classes/PathList/Finder.html +0 -137
- data/web/doc/api/more/classes/Pool.html +0 -207
- data/web/doc/api/more/classes/Proc.html +0 -140
- data/web/doc/api/more/classes/PromoteSelf.html +0 -138
- data/web/doc/api/more/classes/Quaternion.html +0 -1497
- data/web/doc/api/more/classes/REXMLBuilder.html +0 -357
- data/web/doc/api/more/classes/REXMLBuilder/REXMLUtil.html +0 -396
- data/web/doc/api/more/classes/Recorder.html +0 -208
- data/web/doc/api/more/classes/Reference.html +0 -201
- data/web/doc/api/more/classes/RubyOneLiners.html +0 -139
- data/web/doc/api/more/classes/RubyTals.html +0 -316
- data/web/doc/api/more/classes/SSLSocketWrap.html +0 -410
- data/web/doc/api/more/classes/Semaphore.html +0 -264
- data/web/doc/api/more/classes/SimpleStringIO.html +0 -139
- data/web/doc/api/more/classes/Snapshot.html +0 -191
- data/web/doc/api/more/classes/StateMachine.html +0 -248
- data/web/doc/api/more/classes/StateParser.html +0 -276
- data/web/doc/api/more/classes/StateParser/Constants.html +0 -109
- data/web/doc/api/more/classes/StateParser/Marker.html +0 -269
- data/web/doc/api/more/classes/StateParser/State.html +0 -448
- data/web/doc/api/more/classes/StaticHash.html +0 -144
- data/web/doc/api/more/classes/String.html +0 -278
- data/web/doc/api/more/classes/StringIO.html +0 -123
- data/web/doc/api/more/classes/Struct.html +0 -134
- data/web/doc/api/more/classes/Symbol.html +0 -116
- data/web/doc/api/more/classes/SyncArray.html +0 -131
- data/web/doc/api/more/classes/SyncHash.html +0 -135
- data/web/doc/api/more/classes/SyncHash/Delegator.html +0 -213
- data/web/doc/api/more/classes/SyncHash/Inheritor.html +0 -213
- data/web/doc/api/more/classes/System.html +0 -1055
- data/web/doc/api/more/classes/TSort.html +0 -123
- data/web/doc/api/more/classes/TagIterator.html +0 -706
- data/web/doc/api/more/classes/Task.html +0 -237
- data/web/doc/api/more/classes/Task/Graph.html +0 -165
- data/web/doc/api/more/classes/Taskable.html +0 -300
- data/web/doc/api/more/classes/Time.html +0 -746
- data/web/doc/api/more/classes/Timer.html +0 -471
- data/web/doc/api/more/classes/Timer/Dummy.html +0 -141
- data/web/doc/api/more/classes/TracePoint.html +0 -453
- data/web/doc/api/more/classes/TrueClass.html +0 -118
- data/web/doc/api/more/classes/Tuple.html +0 -861
- data/web/doc/api/more/classes/URI.html +0 -107
- data/web/doc/api/more/classes/Uninheritable.html +0 -130
- data/web/doc/api/more/classes/Units.html +0 -191
- data/web/doc/api/more/classes/Units/Config.html +0 -120
- data/web/doc/api/more/classes/Units/Converter.html +0 -808
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate.html +0 -155
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate/CachedXMethods.html +0 -143
- data/web/doc/api/more/classes/Units/Converter/ExchangeRate/XMethods.html +0 -197
- data/web/doc/api/more/classes/Units/Unit.html +0 -434
- data/web/doc/api/more/classes/Units/Value.html +0 -331
- data/web/doc/api/more/classes/ValueHolder.html +0 -167
- data/web/doc/api/more/classes/WebAgent.html +0 -103
- data/web/doc/api/more/classes/WebAgent/Cookie.html +0 -513
- data/web/doc/api/more/classes/WebAgent/CookieManager.html +0 -515
- data/web/doc/api/more/classes/WebAgent/CookieManager/Error.html +0 -96
- data/web/doc/api/more/classes/WebAgent/CookieManager/ErrorOverrideOK.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieManager/NoDotError.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieManager/SpecialError.html +0 -94
- data/web/doc/api/more/classes/WebAgent/CookieUtils.html +0 -171
- data/web/doc/api/more/classes/XMLBuilder.html +0 -132
- data/web/doc/api/more/classes/XMLHelper.html +0 -428
- data/web/doc/api/more/classes/XOXO.html +0 -252
- data/web/doc/api/more/classes/YAMLStruct.html +0 -166
- data/web/doc/api/more/created.rid +0 -1
- data/web/doc/api/more/files/AUTHORS.html +0 -206
- data/web/doc/api/more/files/COPYING.html +0 -517
- data/web/doc/api/more/files/README.html +0 -389
- data/web/doc/api/more/files/WARNING.html +0 -151
- data/web/doc/api/more/files/lib/facets/more/annattr_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/annotation_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/ansicode_rb.html +0 -128
- data/web/doc/api/more/files/lib/facets/more/aspects_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/association_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/basicobject_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/bbcode_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/binaryreader_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/bitmask_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/blankslate_rb.html +0 -113
- data/web/doc/api/more/files/lib/facets/more/builderobject_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/bytes_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/classinherit_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/classmethods_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/cloneable_rb.html +0 -132
- data/web/doc/api/more/files/lib/facets/more/consoleapp_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/cookie_rb.html +0 -133
- data/web/doc/api/more/files/lib/facets/more/coroutine_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/crypt_rb.html +0 -146
- data/web/doc/api/more/files/lib/facets/more/dictionary_rb.html +0 -123
- data/web/doc/api/more/files/lib/facets/more/downloader_rb.html +0 -124
- data/web/doc/api/more/files/lib/facets/more/elementor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/enumerablepass_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/expirable_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/filelist_rb.html +0 -128
- data/web/doc/api/more/files/lib/facets/more/floatstring_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/functor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/hashbuilder_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/heap_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/htmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/htmlhelper_rb.html +0 -119
- data/web/doc/api/more/files/lib/facets/more/http_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/httpaccess_rb.html +0 -137
- data/web/doc/api/more/files/lib/facets/more/inheritor_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/interval_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/ioredirect_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/json_rb.html +0 -141
- data/web/doc/api/more/files/lib/facets/more/lazy_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/lisp_format_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/lisp_rb.html +0 -119
- data/web/doc/api/more/files/lib/facets/more/lrucache_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/mathconstants_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/methodprobe_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/mock_rb.html +0 -208
- data/web/doc/api/more/files/lib/facets/more/multipliers_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/multiton_rb.html +0 -114
- data/web/doc/api/more/files/lib/facets/more/nackclass_rb.html +0 -151
- data/web/doc/api/more/files/lib/facets/more/nilcomparable_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/nullclass_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/one_rb.html +0 -158
- data/web/doc/api/more/files/lib/facets/more/opencascade_rb.html +0 -129
- data/web/doc/api/more/files/lib/facets/more/openobject_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/orderedhash_rb.html +0 -113
- data/web/doc/api/more/files/lib/facets/more/ormsupport_rb.html +0 -125
- data/web/doc/api/more/files/lib/facets/more/overload_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/paramix_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/pathlist_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/pool_rb.html +0 -120
- data/web/doc/api/more/files/lib/facets/more/pqueue_rb.html +0 -122
- data/web/doc/api/more/files/lib/facets/more/preinitialize_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/progressbar_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/promoteself_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/quaternion_rb.html +0 -150
- data/web/doc/api/more/files/lib/facets/more/recorder_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/reference_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/rexmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/rtals_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/semaphore_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/snapshot_rb.html +0 -121
- data/web/doc/api/more/files/lib/facets/more/stateparser_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/statichash_rb.html +0 -133
- data/web/doc/api/more/files/lib/facets/more/syncarray_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/synchash_rb.html +0 -115
- data/web/doc/api/more/files/lib/facets/more/system_rb.html +0 -123
- data/web/doc/api/more/files/lib/facets/more/tagiterator_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/taskable_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/timer_rb.html +0 -127
- data/web/doc/api/more/files/lib/facets/more/times_rb.html +0 -127
- data/web/doc/api/more/files/lib/facets/more/tracepoint_rb.html +0 -131
- data/web/doc/api/more/files/lib/facets/more/tuple_rb.html +0 -122
- data/web/doc/api/more/files/lib/facets/more/typecast_rb.html +0 -124
- data/web/doc/api/more/files/lib/facets/more/uninheritable_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/units_rb.html +0 -118
- data/web/doc/api/more/files/lib/facets/more/xmlbuilder_rb.html +0 -116
- data/web/doc/api/more/files/lib/facets/more/xmlhelper_rb.html +0 -111
- data/web/doc/api/more/files/lib/facets/more/xoxo_rb.html +0 -125
- data/web/doc/api/more/files/lib/facets/more/yamlstruct_rb.html +0 -123
- data/web/doc/api/more/fr_class_index.html +0 -197
- data/web/doc/api/more/fr_file_index.html +0 -136
- data/web/doc/api/more/fr_method_index.html +0 -1290
- data/web/doc/api/more/index.html +0 -26
- data/web/doc/api/more/rdoc-style.css +0 -175
- data/web/images/best_jupiter_cass.jpg +0 -0
- data/web/images/super-friends-volume-two-20050606010933166-001.jpg +0 -0
@@ -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,1435 +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/self/combinations_rb.html">lib/facets/core/enumerable/self/combinations.rb</a>
|
92
|
-
<a href="../files/lib/facets/core/enumerable/self/cross_rb.html">lib/facets/core/enumerable/self/cross.rb</a>
|
93
|
-
</td>
|
94
|
-
</tr>
|
95
|
-
</table>
|
96
|
-
</td>
|
97
|
-
</tr>
|
98
|
-
</table>
|
99
|
-
<!-- banner header -->
|
100
|
-
|
101
|
-
<div id="bodyContent">
|
102
|
-
<div id="content">
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
<div class="sectiontitle">Methods</div>
|
108
|
-
<ul>
|
109
|
-
<li><a href="#M000487">**</a></li>
|
110
|
-
<li><a href="#M000499">accumulate</a></li>
|
111
|
-
<li><a href="#M000500">collect_if</a></li>
|
112
|
-
<li><a href="#M000477">collect_with_counter</a></li>
|
113
|
-
<li><a href="#M000475">collect_with_index</a></li>
|
114
|
-
<li><a href="#M000504">combinations</a></li>
|
115
|
-
<li><a href="#M000493">commonality</a></li>
|
116
|
-
<li><a href="#M000482">compact_collect</a></li>
|
117
|
-
<li><a href="#M000483">compact_map</a></li>
|
118
|
-
<li><a href="#M000502">count</a></li>
|
119
|
-
<li><a href="#M000498">cross</a></li>
|
120
|
-
<li><a href="#M000505">cross</a></li>
|
121
|
-
<li><a href="#M000495">each_by</a></li>
|
122
|
-
<li><a href="#M000480">each_pair</a></li>
|
123
|
-
<li><a href="#M000491">each_permutation</a></li>
|
124
|
-
<li><a href="#M000494">each_slice</a></li>
|
125
|
-
<li><a href="#M000464">elementwise</a></li>
|
126
|
-
<li><a href="#M000496">entropy</a></li>
|
127
|
-
<li><a href="#M000481">every</a></li>
|
128
|
-
<li><a href="#M000465">ew</a></li>
|
129
|
-
<li><a href="#M000467">filter_collect</a></li>
|
130
|
-
<li><a href="#M000468">filter_map</a></li>
|
131
|
-
<li><a href="#M000463">find_collisions</a></li>
|
132
|
-
<li><a href="#M000488">frequency</a></li>
|
133
|
-
<li><a href="#M000466">graph</a></li>
|
134
|
-
<li><a href="#M000469">ideal_entropy</a></li>
|
135
|
-
<li><a href="#M000501">map_if</a></li>
|
136
|
-
<li><a href="#M000478">map_with_counter</a></li>
|
137
|
-
<li><a href="#M000476">map_with_index</a></li>
|
138
|
-
<li><a href="#M000503">mode</a></li>
|
139
|
-
<li><a href="#M000485">none?</a></li>
|
140
|
-
<li><a href="#M000472">nonuniq</a></li>
|
141
|
-
<li><a href="#M000473">nonuniq!</a></li>
|
142
|
-
<li><a href="#M000492">occur</a></li>
|
143
|
-
<li><a href="#M000484">one?</a></li>
|
144
|
-
<li><a href="#M000471">partition_by</a></li>
|
145
|
-
<li><a href="#M000490">permutation_number</a></li>
|
146
|
-
<li><a href="#M000489">permute</a></li>
|
147
|
-
<li><a href="#M000474">probability</a></li>
|
148
|
-
<li><a href="#M000486">project</a></li>
|
149
|
-
<li><a href="#M000479">to_h</a></li>
|
150
|
-
<li><a href="#M000497">uniq_by</a></li>
|
151
|
-
<li><a href="#M000470">where</a></li>
|
152
|
-
</ul>
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<div class="sectiontitle">Public Class methods</div>
|
160
|
-
<div class="method">
|
161
|
-
<div class="title">
|
162
|
-
<a name="M000504"></a><b>combinations</b>(head, *rest)
|
163
|
-
</div>
|
164
|
-
<div class="description">
|
165
|
-
<p>
|
166
|
-
Produces an array of arrays of all possible combinations of the given
|
167
|
-
arrays in the position given. (Explain me better?)
|
168
|
-
</p>
|
169
|
-
<pre>
|
170
|
-
a = %w|a b|
|
171
|
-
b = %w|a x|
|
172
|
-
c = %w|x y|
|
173
|
-
Array.combinations(a, b, c).each { |x| p x }
|
174
|
-
</pre>
|
175
|
-
<p>
|
176
|
-
produces
|
177
|
-
</p>
|
178
|
-
<pre>
|
179
|
-
["a", "a", "x"]
|
180
|
-
["a", "a", "y"]
|
181
|
-
["a", "x", "x"]
|
182
|
-
["a", "x", "y"]
|
183
|
-
["b", "a", "x"]
|
184
|
-
["b", "a", "y"]
|
185
|
-
["b", "x", "x"]
|
186
|
-
["b", "x", "y"]
|
187
|
-
</pre>
|
188
|
-
</div>
|
189
|
-
<div class="sourcecode">
|
190
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000504_source')" id="l_M000504_source">show source</a> ]</p>
|
191
|
-
<div id="M000504_source" class="dyn-source">
|
192
|
-
<pre>
|
193
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/combinations.rb, line 23</span>
|
194
|
-
<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>)
|
195
|
-
<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>)
|
196
|
-
<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>
|
197
|
-
<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> }
|
198
|
-
}
|
199
|
-
<span class="ruby-keyword kw">end</span>
|
200
|
-
</pre>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
</div>
|
204
|
-
<div class="method">
|
205
|
-
<div class="title">
|
206
|
-
<a name="M000505"></a><b>cross</b>(*enums, &block)
|
207
|
-
</div>
|
208
|
-
<div class="description">
|
209
|
-
<p>
|
210
|
-
Provides the cross-product of two or more Enumerables. This is the
|
211
|
-
class-level method. The instance method calls on this.
|
212
|
-
</p>
|
213
|
-
<pre>
|
214
|
-
Enumerable.cross([1,2], [4], ["apple", "banana"])
|
215
|
-
#=> [[1, 4, "apple"], [1, 4, "banana"], [2, 4, "apple"], [2, 4, "banana"]]
|
216
|
-
|
217
|
-
Enumerable.cross([1,2], [3,4])
|
218
|
-
#=> [[1, 3], [1, 4], [2, 3], [2, 4]]
|
219
|
-
</pre>
|
220
|
-
</div>
|
221
|
-
<div class="sourcecode">
|
222
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000505_source')" id="l_M000505_source">show source</a> ]</p>
|
223
|
-
<div id="M000505_source" class="dyn-source">
|
224
|
-
<pre>
|
225
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/self/cross.rb, line 21</span>
|
226
|
-
<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>)
|
227
|
-
|
228
|
-
<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>
|
229
|
-
<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>)}
|
230
|
-
<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>}
|
231
|
-
|
232
|
-
<span class="ruby-identifier">sz</span> = <span class="ruby-identifier">gens</span>.<span class="ruby-identifier">size</span>
|
233
|
-
<span class="ruby-identifier">res</span> = []
|
234
|
-
<span class="ruby-identifier">tuple</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sz</span>)
|
235
|
-
|
236
|
-
<span class="ruby-identifier">loop</span> <span class="ruby-keyword kw">do</span>
|
237
|
-
<span class="ruby-comment cmt"># fill tuple</span>
|
238
|
-
(<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>
|
239
|
-
<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>
|
240
|
-
}
|
241
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">nil?</span>
|
242
|
-
<span class="ruby-identifier">res</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>
|
243
|
-
<span class="ruby-keyword kw">else</span>
|
244
|
-
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">tuple</span>.<span class="ruby-identifier">dup</span>)
|
245
|
-
<span class="ruby-keyword kw">end</span>
|
246
|
-
|
247
|
-
<span class="ruby-comment cmt"># step forward</span>
|
248
|
-
<span class="ruby-identifier">gens</span>[<span class="ruby-value">-1</span>].<span class="ruby-identifier">next</span>
|
249
|
-
(<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>
|
250
|
-
<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>
|
251
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
252
|
-
<span class="ruby-identifier">gens</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">rewind</span>
|
253
|
-
<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>
|
254
|
-
<span class="ruby-keyword kw">else</span>
|
255
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">res</span>
|
256
|
-
<span class="ruby-keyword kw">end</span>
|
257
|
-
<span class="ruby-keyword kw">end</span>
|
258
|
-
<span class="ruby-keyword kw">end</span>
|
259
|
-
<span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#loop</span>
|
260
|
-
|
261
|
-
<span class="ruby-keyword kw">end</span>
|
262
|
-
</pre>
|
263
|
-
</div>
|
264
|
-
</div>
|
265
|
-
</div>
|
266
|
-
<div class="sectiontitle">Public Instance methods</div>
|
267
|
-
<div class="method">
|
268
|
-
<div class="title">
|
269
|
-
<a name="M000487"></a><b>**</b>(enum)
|
270
|
-
</div>
|
271
|
-
<div class="description">
|
272
|
-
<p>
|
273
|
-
Operator alias for cross-product.
|
274
|
-
</p>
|
275
|
-
<pre>
|
276
|
-
a = [1,2] ** [4,5]
|
277
|
-
a #=> [[1, 4],[1, 5],[2, 4],[2, 5]]
|
278
|
-
</pre>
|
279
|
-
</div>
|
280
|
-
<div class="sourcecode">
|
281
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000487_source')" id="l_M000487_source">show source</a> ]</p>
|
282
|
-
<div id="M000487_source" class="dyn-source">
|
283
|
-
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/op_pow.rb, line 11</span>
|
285
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-identifier">enum</span>)
|
286
|
-
<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>)
|
287
|
-
<span class="ruby-keyword kw">end</span>
|
288
|
-
</pre>
|
289
|
-
</div>
|
290
|
-
</div>
|
291
|
-
</div>
|
292
|
-
<div class="method">
|
293
|
-
<div class="title">
|
294
|
-
<a name="M000499"></a><b>accumulate</b>()
|
295
|
-
</div>
|
296
|
-
<div class="description">
|
297
|
-
<p>
|
298
|
-
Project has_many Group Group has_many User projects.groups.accumulate.users
|
299
|
-
</p>
|
300
|
-
</div>
|
301
|
-
<div class="sourcecode">
|
302
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000499_source')" id="l_M000499_source">show source</a> ]</p>
|
303
|
-
<div id="M000499_source" class="dyn-source">
|
304
|
-
<pre>
|
305
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/accumulate.rb, line 16</span>
|
306
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accumulate</span>
|
307
|
-
<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>
|
308
|
-
<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>
|
309
|
-
<span class="ruby-keyword kw">end</span>
|
310
|
-
<span class="ruby-keyword kw">end</span>
|
311
|
-
</pre>
|
312
|
-
</div>
|
313
|
-
</div>
|
314
|
-
</div>
|
315
|
-
<div class="method">
|
316
|
-
<div class="title">
|
317
|
-
<a name="M000500"></a><b>collect_if</b>(&b)
|
318
|
-
</div>
|
319
|
-
<div class="aka">
|
320
|
-
This method is also aliased as
|
321
|
-
<a href="Enumerable.html#M000501">map_if</a>
|
322
|
-
</div>
|
323
|
-
<div class="sourcecode">
|
324
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000500_source')" id="l_M000500_source">show source</a> ]</p>
|
325
|
-
<div id="M000500_source" class="dyn-source">
|
326
|
-
<pre>
|
327
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_if.rb, line 4</span>
|
328
|
-
<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>)
|
329
|
-
<span class="ruby-identifier">a</span> = <span class="ruby-identifier">map</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
330
|
-
<span class="ruby-comment cmt"># to get the same semantics as select{|e| e}</span>
|
331
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-keyword kw">false</span>)
|
332
|
-
<span class="ruby-identifier">a</span>.<span class="ruby-identifier">compact!</span>
|
333
|
-
<span class="ruby-identifier">a</span>
|
334
|
-
<span class="ruby-keyword kw">end</span>
|
335
|
-
</pre>
|
336
|
-
</div>
|
337
|
-
</div>
|
338
|
-
</div>
|
339
|
-
<div class="method">
|
340
|
-
<div class="title">
|
341
|
-
<a name="M000477"></a><b>collect_with_counter</b>()
|
342
|
-
</div>
|
343
|
-
<div class="description">
|
344
|
-
<p>
|
345
|
-
Alias for <a href="Enumerable.html#M000475">collect_with_index</a>
|
346
|
-
</p>
|
347
|
-
</div>
|
348
|
-
</div>
|
349
|
-
<div class="method">
|
350
|
-
<div class="title">
|
351
|
-
<a name="M000475"></a><b>collect_with_index</b>() {|self[i], i| ...}
|
352
|
-
</div>
|
353
|
-
<div class="description">
|
354
|
-
<p>
|
355
|
-
Same as collect but with an iteration counter.
|
356
|
-
</p>
|
357
|
-
<pre>
|
358
|
-
a = [1,2,3].collect_with_index { |e,i| e*i }
|
359
|
-
a #=> [0,2,6]
|
360
|
-
</pre>
|
361
|
-
</div>
|
362
|
-
<div class="aka">
|
363
|
-
This method is also aliased as
|
364
|
-
<a href="Enumerable.html#M000476">map_with_index</a>
|
365
|
-
<a href="Enumerable.html#M000477">collect_with_counter</a>
|
366
|
-
<a href="Enumerable.html#M000478">map_with_counter</a>
|
367
|
-
</div>
|
368
|
-
<div class="sourcecode">
|
369
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000475_source')" id="l_M000475_source">show source</a> ]</p>
|
370
|
-
<div id="M000475_source" class="dyn-source">
|
371
|
-
<pre>
|
372
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/collect_with_index.rb, line 9</span>
|
373
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collect_with_index</span>
|
374
|
-
<span class="ruby-identifier">r</span> = []
|
375
|
-
<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>
|
376
|
-
<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>)
|
377
|
-
<span class="ruby-keyword kw">end</span>
|
378
|
-
<span class="ruby-identifier">r</span>
|
379
|
-
<span class="ruby-keyword kw">end</span>
|
380
|
-
</pre>
|
381
|
-
</div>
|
382
|
-
</div>
|
383
|
-
</div>
|
384
|
-
<div class="method">
|
385
|
-
<div class="title">
|
386
|
-
<a name="M000493"></a><b>commonality</b>( &block )
|
387
|
-
</div>
|
388
|
-
<div class="description">
|
389
|
-
<p>
|
390
|
-
Returns all items that are equal in terms of the supplied block. If no
|
391
|
-
block is given objects are considered to be equal if they return the same
|
392
|
-
value for Object#hash and if obj1 == obj2. No guarantee about the order of
|
393
|
-
the elements in the resulting array is made.
|
394
|
-
</p>
|
395
|
-
<p>
|
396
|
-
Note: The result will be an array if you supply no block and a hash
|
397
|
-
otherwise.
|
398
|
-
</p>
|
399
|
-
<pre>
|
400
|
-
[1, 2, 2, 3, 4, 4].commonality # => { 2 => [2], 4 => [4] }
|
401
|
-
|
402
|
-
["foo", "bar", "a"].commonality { |str| str.length }
|
403
|
-
# => { 2 => ["foo, "bar"] }
|
404
|
-
|
405
|
-
# Returns all persons that share their last name with another person.
|
406
|
-
persons.collisions { |person| person.last_name }
|
407
|
-
</pre>
|
408
|
-
</div>
|
409
|
-
<div class="sourcecode">
|
410
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000493_source')" id="l_M000493_source">show source</a> ]</p>
|
411
|
-
<div id="M000493_source" class="dyn-source">
|
412
|
-
<pre>
|
413
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/commonality.rb, line 22</span>
|
414
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
415
|
-
<span class="ruby-identifier">had_no_block</span> = <span class="ruby-operator">!</span><span class="ruby-identifier">block</span>
|
416
|
-
<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> }
|
417
|
-
<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> }
|
418
|
-
<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>
|
419
|
-
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">item</span>)
|
420
|
-
<span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">item</span>
|
421
|
-
<span class="ruby-keyword kw">end</span>
|
422
|
-
<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>
|
423
|
-
<span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator"><=</span> <span class="ruby-value">1</span>
|
424
|
-
<span class="ruby-keyword kw">end</span>
|
425
|
-
<span class="ruby-comment cmt">#return had_no_block ? result.values.flatten : result</span>
|
426
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
427
|
-
<span class="ruby-keyword kw">end</span>
|
428
|
-
</pre>
|
429
|
-
</div>
|
430
|
-
</div>
|
431
|
-
</div>
|
432
|
-
<div class="method">
|
433
|
-
<div class="title">
|
434
|
-
<a name="M000482"></a><b>compact_collect</b>( {|| ...}
|
435
|
-
</div>
|
436
|
-
<div class="description">
|
437
|
-
<p>
|
438
|
-
Collects/Maps and compacts items in one single step. The items for which
|
439
|
-
the supplied block returns <tt>nil</tt> will not end up in the resulting
|
440
|
-
array.
|
441
|
-
</p>
|
442
|
-
<pre>
|
443
|
-
# Return telephone numbers of all persons that have a telephone number.
|
444
|
-
persons.compact_collect { |person| person.telephone_no }
|
445
|
-
</pre>
|
446
|
-
<p>
|
447
|
-
Also see Enumerable#collect, Enumerable#map, Array#compact.
|
448
|
-
</p>
|
449
|
-
</div>
|
450
|
-
<div class="aka">
|
451
|
-
This method is also aliased as
|
452
|
-
<a href="Enumerable.html#M000483">compact_map</a>
|
453
|
-
</div>
|
454
|
-
<div class="sourcecode">
|
455
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000482_source')" id="l_M000482_source">show source</a> ]</p>
|
456
|
-
<div id="M000482_source" class="dyn-source">
|
457
|
-
<pre>
|
458
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/compact_collect.rb, line 17</span>
|
459
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">compact_collect</span> <span class="ruby-comment cmt">#:yield:</span>
|
460
|
-
<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>
|
461
|
-
<span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
|
462
|
-
<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>
|
463
|
-
<span class="ruby-identifier">new_item</span>
|
464
|
-
<span class="ruby-keyword kw">end</span>
|
465
|
-
<span class="ruby-keyword kw">end</span>
|
466
|
-
</pre>
|
467
|
-
</div>
|
468
|
-
</div>
|
469
|
-
</div>
|
470
|
-
<div class="method">
|
471
|
-
<div class="title">
|
472
|
-
<a name="M000483"></a><b>compact_map</b>(
|
473
|
-
</div>
|
474
|
-
<div class="description">
|
475
|
-
<p>
|
476
|
-
Alias for <a href="Enumerable.html#M000482">compact_collect</a>
|
477
|
-
</p>
|
478
|
-
</div>
|
479
|
-
</div>
|
480
|
-
<div class="method">
|
481
|
-
<div class="title">
|
482
|
-
<a name="M000502"></a><b>count</b>(*c)
|
483
|
-
</div>
|
484
|
-
<div class="description">
|
485
|
-
<p>
|
486
|
-
Count the number of items in an enuerable equal (==) to the given object.
|
487
|
-
</p>
|
488
|
-
<pre>
|
489
|
-
e = [ 'a', '1', 'a' ]
|
490
|
-
e.count('1') #=> 1
|
491
|
-
e.count('a') #=> 2
|
492
|
-
</pre>
|
493
|
-
<p>
|
494
|
-
Count can also handle multiple-valued blocks.
|
495
|
-
</p>
|
496
|
-
<pre>
|
497
|
-
e = { 'a' => 2, 'a' => 2, 'b' => 1 }
|
498
|
-
e.count('a',2) #=> 1
|
499
|
-
</pre>
|
500
|
-
</div>
|
501
|
-
<div class="sourcecode">
|
502
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000502_source')" id="l_M000502_source">show source</a> ]</p>
|
503
|
-
<div id="M000502_source" class="dyn-source">
|
504
|
-
<pre>
|
505
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/count.rb, line 16</span>
|
506
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">c</span>)
|
507
|
-
<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>
|
508
|
-
<span class="ruby-keyword kw">end</span>
|
509
|
-
</pre>
|
510
|
-
</div>
|
511
|
-
</div>
|
512
|
-
</div>
|
513
|
-
<div class="method">
|
514
|
-
<div class="title">
|
515
|
-
<a name="M000498"></a><b>cross</b>(*enums, &block)
|
516
|
-
</div>
|
517
|
-
<div class="description">
|
518
|
-
<p>
|
519
|
-
The instance level cross-product method.
|
520
|
-
</p>
|
521
|
-
<pre>
|
522
|
-
a = []
|
523
|
-
[1,2].cross([4,5]){|elem| a << elem }
|
524
|
-
a #=> [[1, 4],[1, 5],[2, 4],[2, 5]]
|
525
|
-
</pre>
|
526
|
-
</div>
|
527
|
-
<div class="sourcecode">
|
528
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000498_source')" id="l_M000498_source">show source</a> ]</p>
|
529
|
-
<div id="M000498_source" class="dyn-source">
|
530
|
-
<pre>
|
531
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/cross.rb, line 17</span>
|
532
|
-
<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>)
|
533
|
-
<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>)
|
534
|
-
<span class="ruby-keyword kw">end</span>
|
535
|
-
</pre>
|
536
|
-
</div>
|
537
|
-
</div>
|
538
|
-
</div>
|
539
|
-
<div class="method">
|
540
|
-
<div class="title">
|
541
|
-
<a name="M000495"></a><b>each_by</b>(step=nil, &yld)
|
542
|
-
</div>
|
543
|
-
<div class="description">
|
544
|
-
<p>
|
545
|
-
Alias for <a href="Enumerable.html#M000494">each_slice</a>
|
546
|
-
</p>
|
547
|
-
</div>
|
548
|
-
</div>
|
549
|
-
<div class="method">
|
550
|
-
<div class="title">
|
551
|
-
<a name="M000480"></a><b>each_pair</b>( {|| ...}
|
552
|
-
</div>
|
553
|
-
<div class="description">
|
554
|
-
<p>
|
555
|
-
Iterators ovr each element pairing.
|
556
|
-
</p>
|
557
|
-
<pre>
|
558
|
-
[:a,:b,:c,:d].each_pair { |a,b| puts "#{a} -> #{b}" }
|
559
|
-
</pre>
|
560
|
-
<p>
|
561
|
-
<em>produces</em>
|
562
|
-
</p>
|
563
|
-
<pre>
|
564
|
-
a -> b
|
565
|
-
c -> d
|
566
|
-
</pre>
|
567
|
-
</div>
|
568
|
-
<div class="sourcecode">
|
569
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000480_source')" id="l_M000480_source">show source</a> ]</p>
|
570
|
-
<div id="M000480_source" class="dyn-source">
|
571
|
-
<pre>
|
572
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_pair.rb, line 13</span>
|
573
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_pair</span> <span class="ruby-comment cmt">#:yield:</span>
|
574
|
-
<span class="ruby-identifier">e1</span> = <span class="ruby-keyword kw">nil</span>
|
575
|
-
<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>
|
576
|
-
<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>
|
577
|
-
<span class="ruby-identifier">e1</span> = <span class="ruby-identifier">e</span>
|
578
|
-
<span class="ruby-keyword kw">next</span>
|
579
|
-
<span class="ruby-keyword kw">else</span>
|
580
|
-
<span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e1</span>,<span class="ruby-identifier">e</span>)
|
581
|
-
<span class="ruby-keyword kw">end</span>
|
582
|
-
<span class="ruby-keyword kw">end</span>
|
583
|
-
<span class="ruby-keyword kw">end</span>
|
584
|
-
</pre>
|
585
|
-
</div>
|
586
|
-
</div>
|
587
|
-
</div>
|
588
|
-
<div class="method">
|
589
|
-
<div class="title">
|
590
|
-
<a name="M000491"></a><b>each_permutation</b>() {|out| ...}
|
591
|
-
</div>
|
592
|
-
<div class="description">
|
593
|
-
<p>
|
594
|
-
Applys a block to each possible permutation of an array/enumerable.
|
595
|
-
</p>
|
596
|
-
<pre>
|
597
|
-
%w[a b c].each_permutation { |x| puts(x.join('')) }
|
598
|
-
</pre>
|
599
|
-
<p>
|
600
|
-
produces
|
601
|
-
</p>
|
602
|
-
<pre>
|
603
|
-
abc
|
604
|
-
acb
|
605
|
-
bac
|
606
|
-
bca
|
607
|
-
cab
|
608
|
-
cba
|
609
|
-
</pre>
|
610
|
-
</div>
|
611
|
-
<div class="sourcecode">
|
612
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000491_source')" id="l_M000491_source">show source</a> ]</p>
|
613
|
-
<div id="M000491_source" class="dyn-source">
|
614
|
-
<pre>
|
615
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 49</span>
|
616
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_permutation</span>()
|
617
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
618
|
-
<span class="ruby-identifier">size</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span>
|
619
|
-
<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> }
|
620
|
-
<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> }
|
621
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">weights</span>.<span class="ruby-identifier">size</span>
|
622
|
-
<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>
|
623
|
-
<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>
|
624
|
-
<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>]
|
625
|
-
<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>
|
626
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
|
627
|
-
<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>
|
628
|
-
<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>)
|
629
|
-
<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>)
|
630
|
-
<span class="ruby-keyword kw">end</span>
|
631
|
-
}
|
632
|
-
<span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">out</span>
|
633
|
-
<span class="ruby-keyword kw">end</span>
|
634
|
-
<span class="ruby-keyword kw">end</span>
|
635
|
-
</pre>
|
636
|
-
</div>
|
637
|
-
</div>
|
638
|
-
</div>
|
639
|
-
<div class="method">
|
640
|
-
<div class="title">
|
641
|
-
<a name="M000494"></a><b>each_slice</b>(step=nil, &yld)
|
642
|
-
</div>
|
643
|
-
<div class="description">
|
644
|
-
<p>
|
645
|
-
Iterate through slices. If slicing <em>step</em> is not given, the the
|
646
|
-
arity if the block is used.
|
647
|
-
</p>
|
648
|
-
<pre>
|
649
|
-
x = []
|
650
|
-
[1,2,3,4].each_slice(2){ |a,b| x << [a,b] }
|
651
|
-
x #=> [ [1,2], [3,4] ]
|
652
|
-
|
653
|
-
x = []
|
654
|
-
[1,2,3,4,5,6].each_slice(3){ |a| x << a }
|
655
|
-
x #=> [ [1,2,3], [4,5,6] ]
|
656
|
-
</pre>
|
657
|
-
</div>
|
658
|
-
<div class="aka">
|
659
|
-
This method is also aliased as
|
660
|
-
<a href="Enumerable.html#M000495">each_by</a>
|
661
|
-
</div>
|
662
|
-
<div class="sourcecode">
|
663
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000494_source')" id="l_M000494_source">show source</a> ]</p>
|
664
|
-
<div id="M000494_source" class="dyn-source">
|
665
|
-
<pre>
|
666
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/each_slice.rb, line 15</span>
|
667
|
-
<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>)
|
668
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">step</span>
|
669
|
-
<span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">step</span>
|
670
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
|
671
|
-
<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>
|
672
|
-
<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>
|
673
|
-
<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>))
|
674
|
-
}
|
675
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
|
676
|
-
<span class="ruby-keyword kw">else</span>
|
677
|
-
<span class="ruby-identifier">cnt</span> = <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">arity</span>.<span class="ruby-identifier">abs</span>
|
678
|
-
<span class="ruby-identifier">n</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">cnt</span>
|
679
|
-
<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>
|
680
|
-
<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>
|
681
|
-
<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>))
|
682
|
-
}
|
683
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cnt</span>
|
684
|
-
<span class="ruby-keyword kw">end</span>
|
685
|
-
<span class="ruby-keyword kw">end</span>
|
686
|
-
</pre>
|
687
|
-
</div>
|
688
|
-
</div>
|
689
|
-
</div>
|
690
|
-
<div class="method">
|
691
|
-
<div class="title">
|
692
|
-
<a name="M000464"></a><b>elementwise</b>()
|
693
|
-
</div>
|
694
|
-
<div class="description">
|
695
|
-
<p>
|
696
|
-
Returns an elementwise Functor designed to make R-like elementwise
|
697
|
-
operations possible.
|
698
|
-
</p>
|
699
|
-
<pre>
|
700
|
-
[1,2].ew + 3 #=> [4,5]
|
701
|
-
[1,2].ew + [4,5] #=> [5,7]
|
702
|
-
[1,2].ew + [[4,5],3] #=> [[5,7],[4,5]
|
703
|
-
</pre>
|
704
|
-
</div>
|
705
|
-
<div class="aka">
|
706
|
-
This method is also aliased as
|
707
|
-
<a href="Enumerable.html#M000465">ew</a>
|
708
|
-
</div>
|
709
|
-
<div class="sourcecode">
|
710
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000464_source')" id="l_M000464_source">show source</a> ]</p>
|
711
|
-
<div id="M000464_source" class="dyn-source">
|
712
|
-
<pre>
|
713
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/ew.rb, line 16</span>
|
714
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">elementwise</span>
|
715
|
-
<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>
|
716
|
-
<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>
|
717
|
-
<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>)
|
718
|
-
<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> )
|
719
|
-
<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>) }
|
720
|
-
<span class="ruby-comment cmt">#self[0...ln].zip(arg[0...1n]).collect{ |a,b| b ? a.send(op,b) : nil }</span>
|
721
|
-
<span class="ruby-keyword kw">else</span>
|
722
|
-
<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>) }
|
723
|
-
<span class="ruby-keyword kw">end</span>
|
724
|
-
<span class="ruby-keyword kw">end</span>
|
725
|
-
<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>
|
726
|
-
<span class="ruby-identifier">a</span>
|
727
|
-
<span class="ruby-keyword kw">end</span>
|
728
|
-
<span class="ruby-keyword kw">end</span>
|
729
|
-
</pre>
|
730
|
-
</div>
|
731
|
-
</div>
|
732
|
-
</div>
|
733
|
-
<div class="method">
|
734
|
-
<div class="title">
|
735
|
-
<a name="M000496"></a><b>entropy</b>()
|
736
|
-
</div>
|
737
|
-
<div class="description">
|
738
|
-
<p>
|
739
|
-
Shannon’s entropy for an array - returns the average bits per symbol
|
740
|
-
required to encode the array. Lower values mean less "entropy" -
|
741
|
-
i.e. less unique information in the array.
|
742
|
-
</p>
|
743
|
-
<pre>
|
744
|
-
%w{ a b c d e e e }.entropy #=>
|
745
|
-
</pre>
|
746
|
-
</div>
|
747
|
-
<div class="sourcecode">
|
748
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000496_source')" id="l_M000496_source">show source</a> ]</p>
|
749
|
-
<div id="M000496_source" class="dyn-source">
|
750
|
-
<pre>
|
751
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/entropy.rb, line 15</span>
|
752
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">entropy</span>
|
753
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
|
754
|
-
<span class="ruby-identifier">probHash</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">probability</span>
|
755
|
-
<span class="ruby-comment cmt"># h is the Shannon entropy of the array</span>
|
756
|
-
<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>
|
757
|
-
<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>)))
|
758
|
-
<span class="ruby-keyword kw">end</span>
|
759
|
-
<span class="ruby-identifier">h</span>
|
760
|
-
<span class="ruby-keyword kw">end</span>
|
761
|
-
</pre>
|
762
|
-
</div>
|
763
|
-
</div>
|
764
|
-
</div>
|
765
|
-
<div class="method">
|
766
|
-
<div class="title">
|
767
|
-
<a name="M000481"></a><b>every</b>()
|
768
|
-
</div>
|
769
|
-
<div class="description">
|
770
|
-
<p>
|
771
|
-
Returns an elementwise Functor. This allows you to map a method on to every
|
772
|
-
element.
|
773
|
-
</p>
|
774
|
-
<pre>
|
775
|
-
[1,2,3].every + 3 #=> [4,5,6]
|
776
|
-
|
777
|
-
['a','b','c'].every.upcase #=> ['A','B','C']
|
778
|
-
</pre>
|
779
|
-
</div>
|
780
|
-
<div class="sourcecode">
|
781
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000481_source')" id="l_M000481_source">show source</a> ]</p>
|
782
|
-
<div id="M000481_source" class="dyn-source">
|
783
|
-
<pre>
|
784
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/every.rb, line 13</span>
|
785
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">every</span>
|
786
|
-
<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>
|
787
|
-
<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>) }
|
788
|
-
<span class="ruby-keyword kw">end</span>
|
789
|
-
<span class="ruby-keyword kw">end</span>
|
790
|
-
</pre>
|
791
|
-
</div>
|
792
|
-
</div>
|
793
|
-
</div>
|
794
|
-
<div class="method">
|
795
|
-
<div class="title">
|
796
|
-
<a name="M000465"></a><b>ew</b>()
|
797
|
-
</div>
|
798
|
-
<div class="description">
|
799
|
-
<p>
|
800
|
-
Alias for <a href="Enumerable.html#M000464">elementwise</a>
|
801
|
-
</p>
|
802
|
-
</div>
|
803
|
-
</div>
|
804
|
-
<div class="method">
|
805
|
-
<div class="title">
|
806
|
-
<a name="M000467"></a><b>filter_collect</b>( {|| ...}
|
807
|
-
</div>
|
808
|
-
<div class="description">
|
809
|
-
<p>
|
810
|
-
Collects/Maps and filters items out in one single step. You can use
|
811
|
-
throw(:skip) in the supplied block to indicate that the current item should
|
812
|
-
not end up in the resulting array.
|
813
|
-
</p>
|
814
|
-
<pre>
|
815
|
-
# Return names of all person with an age of at least 18.
|
816
|
-
persons.filter_collect do |person|
|
817
|
-
throw(:skip) if person.age < 18
|
818
|
-
person.name
|
819
|
-
end
|
820
|
-
</pre>
|
821
|
-
<p>
|
822
|
-
Also see Enumerable#collect, Enumerable#find_all.
|
823
|
-
</p>
|
824
|
-
</div>
|
825
|
-
<div class="aka">
|
826
|
-
This method is also aliased as
|
827
|
-
<a href="Enumerable.html#M000468">filter_map</a>
|
828
|
-
</div>
|
829
|
-
<div class="sourcecode">
|
830
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000467_source')" id="l_M000467_source">show source</a> ]</p>
|
831
|
-
<div id="M000467_source" class="dyn-source">
|
832
|
-
<pre>
|
833
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/filter_collect.rb, line 18</span>
|
834
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filter_collect</span> <span class="ruby-comment cmt">#:yield:</span>
|
835
|
-
<span class="ruby-identifier">result</span> = []
|
836
|
-
<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>
|
837
|
-
<span class="ruby-identifier">catch</span>(<span class="ruby-identifier">:skip</span>) <span class="ruby-keyword kw">do</span>
|
838
|
-
<span class="ruby-identifier">new_item</span> = <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">item</span>)
|
839
|
-
<span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">new_item</span>
|
840
|
-
<span class="ruby-keyword kw">end</span>
|
841
|
-
<span class="ruby-keyword kw">end</span>
|
842
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
843
|
-
<span class="ruby-keyword kw">end</span>
|
844
|
-
</pre>
|
845
|
-
</div>
|
846
|
-
</div>
|
847
|
-
</div>
|
848
|
-
<div class="method">
|
849
|
-
<div class="title">
|
850
|
-
<a name="M000468"></a><b>filter_map</b>(
|
851
|
-
</div>
|
852
|
-
<div class="description">
|
853
|
-
<p>
|
854
|
-
Alias for <a href="Enumerable.html#M000467">filter_collect</a>
|
855
|
-
</p>
|
856
|
-
</div>
|
857
|
-
</div>
|
858
|
-
<div class="method">
|
859
|
-
<div class="title">
|
860
|
-
<a name="M000463"></a><b>find_collisions</b>( ) {|| ...}
|
861
|
-
</div>
|
862
|
-
<div class="description">
|
863
|
-
<p>
|
864
|
-
Like commonality but returns an array if no block is given.
|
865
|
-
</p>
|
866
|
-
</div>
|
867
|
-
<div class="sourcecode">
|
868
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000463_source')" id="l_M000463_source">show source</a> ]</p>
|
869
|
-
<div id="M000463_source" class="dyn-source">
|
870
|
-
<pre>
|
871
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/find_collisions.rb, line 7</span>
|
872
|
-
<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>
|
873
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
874
|
-
<span class="ruby-identifier">commonality</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
875
|
-
<span class="ruby-keyword kw">else</span>
|
876
|
-
<span class="ruby-identifier">commonality</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">uniq</span>
|
877
|
-
<span class="ruby-keyword kw">end</span>
|
878
|
-
<span class="ruby-keyword kw">end</span>
|
879
|
-
</pre>
|
880
|
-
</div>
|
881
|
-
</div>
|
882
|
-
</div>
|
883
|
-
<div class="method">
|
884
|
-
<div class="title">
|
885
|
-
<a name="M000488"></a><b>frequency</b>()
|
886
|
-
</div>
|
887
|
-
<div class="description">
|
888
|
-
<p>
|
889
|
-
Generates a hash mapping each unique symbol in the array to the absolute
|
890
|
-
frequency it appears.
|
891
|
-
</p>
|
892
|
-
</div>
|
893
|
-
<div class="sourcecode">
|
894
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000488_source')" id="l_M000488_source">show source</a> ]</p>
|
895
|
-
<div id="M000488_source" class="dyn-source">
|
896
|
-
<pre>
|
897
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/frequency.rb, line 8</span>
|
898
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">frequency</span>
|
899
|
-
<span class="ruby-identifier">probs</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
900
|
-
<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>
|
901
|
-
<span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
902
|
-
<span class="ruby-keyword kw">end</span>
|
903
|
-
<span class="ruby-identifier">probs</span>
|
904
|
-
<span class="ruby-keyword kw">end</span>
|
905
|
-
</pre>
|
906
|
-
</div>
|
907
|
-
</div>
|
908
|
-
</div>
|
909
|
-
<div class="method">
|
910
|
-
<div class="title">
|
911
|
-
<a name="M000466"></a><b>graph</b>(&yld)
|
912
|
-
</div>
|
913
|
-
<div class="description">
|
914
|
-
<p>
|
915
|
-
Like <tt>map</tt>/<tt>collect</tt>, but it generates a <a
|
916
|
-
href="Hash.html">Hash</a>. The block is expected to return two values: the
|
917
|
-
key and the value for the new hash.
|
918
|
-
</p>
|
919
|
-
<pre>
|
920
|
-
numbers = (1..3)
|
921
|
-
squares = numbers.graph { |n| [n, n*n] } # { 1=>1, 2=>4, 3=>9 }
|
922
|
-
sq_roots = numbers.graph { |n| [n*n, n] } # { 1=>1, 4=>2, 9=>3 }
|
923
|
-
</pre>
|
924
|
-
</div>
|
925
|
-
<div class="sourcecode">
|
926
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000466_source')" id="l_M000466_source">show source</a> ]</p>
|
927
|
-
<div id="M000466_source" class="dyn-source">
|
928
|
-
<pre>
|
929
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/graph.rb, line 22</span>
|
930
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">graph</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
931
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">yld</span>
|
932
|
-
<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>
|
933
|
-
<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>]
|
934
|
-
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">nk</span>] = <span class="ruby-identifier">nv</span>
|
935
|
-
<span class="ruby-identifier">h</span>
|
936
|
-
<span class="ruby-keyword kw">end</span>
|
937
|
-
<span class="ruby-keyword kw">else</span>
|
938
|
-
<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>]
|
939
|
-
<span class="ruby-keyword kw">end</span>
|
940
|
-
<span class="ruby-keyword kw">end</span>
|
941
|
-
</pre>
|
942
|
-
</div>
|
943
|
-
</div>
|
944
|
-
</div>
|
945
|
-
<div class="method">
|
946
|
-
<div class="title">
|
947
|
-
<a name="M000469"></a><b>ideal_entropy</b>()
|
948
|
-
</div>
|
949
|
-
<div class="description">
|
950
|
-
<p>
|
951
|
-
Returns the maximum possible Shannon entropy of the array with given size
|
952
|
-
assuming that it is an "order-0" source (each element is selected
|
953
|
-
independently of the next).
|
954
|
-
</p>
|
955
|
-
</div>
|
956
|
-
<div class="sourcecode">
|
957
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000469_source')" id="l_M000469_source">show source</a> ]</p>
|
958
|
-
<div id="M000469_source" class="dyn-source">
|
959
|
-
<pre>
|
960
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/ideal_entropy.rb, line 13</span>
|
961
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ideal_entropy</span>
|
962
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_a</span>
|
963
|
-
<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>
|
964
|
-
(<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>))
|
965
|
-
<span class="ruby-keyword kw">end</span>
|
966
|
-
</pre>
|
967
|
-
</div>
|
968
|
-
</div>
|
969
|
-
</div>
|
970
|
-
<div class="method">
|
971
|
-
<div class="title">
|
972
|
-
<a name="M000501"></a><b>map_if</b>(&b)
|
973
|
-
</div>
|
974
|
-
<div class="description">
|
975
|
-
<p>
|
976
|
-
Alias for <a href="Enumerable.html#M000500">collect_if</a>
|
977
|
-
</p>
|
978
|
-
</div>
|
979
|
-
</div>
|
980
|
-
<div class="method">
|
981
|
-
<div class="title">
|
982
|
-
<a name="M000478"></a><b>map_with_counter</b>()
|
983
|
-
</div>
|
984
|
-
<div class="description">
|
985
|
-
<p>
|
986
|
-
Alias for <a href="Enumerable.html#M000475">collect_with_index</a>
|
987
|
-
</p>
|
988
|
-
</div>
|
989
|
-
</div>
|
990
|
-
<div class="method">
|
991
|
-
<div class="title">
|
992
|
-
<a name="M000476"></a><b>map_with_index</b>()
|
993
|
-
</div>
|
994
|
-
<div class="description">
|
995
|
-
<p>
|
996
|
-
Alias for <a href="Enumerable.html#M000475">collect_with_index</a>
|
997
|
-
</p>
|
998
|
-
</div>
|
999
|
-
</div>
|
1000
|
-
<div class="method">
|
1001
|
-
<div class="title">
|
1002
|
-
<a name="M000503"></a><b>mode</b>()
|
1003
|
-
</div>
|
1004
|
-
<div class="description">
|
1005
|
-
<p>
|
1006
|
-
In Statistics mode is the value that occurs most frequently in a given set
|
1007
|
-
of data.
|
1008
|
-
</p>
|
1009
|
-
</div>
|
1010
|
-
<div class="sourcecode">
|
1011
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000503_source')" id="l_M000503_source">show source</a> ]</p>
|
1012
|
-
<div id="M000503_source" class="dyn-source">
|
1013
|
-
<pre>
|
1014
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/mode.rb, line 7</span>
|
1015
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mode</span>
|
1016
|
-
<span class="ruby-identifier">count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
|
1017
|
-
<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> }
|
1018
|
-
<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>]
|
1019
|
-
<span class="ruby-keyword kw">end</span>
|
1020
|
-
</pre>
|
1021
|
-
</div>
|
1022
|
-
</div>
|
1023
|
-
</div>
|
1024
|
-
<div class="method">
|
1025
|
-
<div class="title">
|
1026
|
-
<a name="M000485"></a><b>none?</b>( {|e| ...}
|
1027
|
-
</div>
|
1028
|
-
<div class="description">
|
1029
|
-
<p>
|
1030
|
-
Enumerable#none? is the logical opposite of the builtin method
|
1031
|
-
Enumerable#any?. It returns <tt>true</tt> if and only if <em>none</em> of
|
1032
|
-
the elements in the collection satisfy the predicate.
|
1033
|
-
</p>
|
1034
|
-
<p>
|
1035
|
-
If no predicate is provided, Enumerable#none? returns <tt>true</tt> if and
|
1036
|
-
only if <em>none</em> of the elements have a true value (i.e. not
|
1037
|
-
<tt>nil</tt> or <tt>false</tt>).
|
1038
|
-
</p>
|
1039
|
-
<pre>
|
1040
|
-
[].none? # true
|
1041
|
-
[nil].none? # true
|
1042
|
-
[5,8,9].none? # false
|
1043
|
-
(1...10).none? { |n| n < 0 } # true
|
1044
|
-
(1...10).none? { |n| n > 0 } # false
|
1045
|
-
</pre>
|
1046
|
-
</div>
|
1047
|
-
<div class="sourcecode">
|
1048
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000485_source')" id="l_M000485_source">show source</a> ]</p>
|
1049
|
-
<div id="M000485_source" class="dyn-source">
|
1050
|
-
<pre>
|
1051
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/none.rb, line 20</span>
|
1052
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">none?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
1053
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1054
|
-
<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> }
|
1055
|
-
<span class="ruby-keyword kw">else</span>
|
1056
|
-
<span class="ruby-keyword kw">not</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">any?</span>
|
1057
|
-
<span class="ruby-keyword kw">end</span>
|
1058
|
-
<span class="ruby-keyword kw">end</span>
|
1059
|
-
</pre>
|
1060
|
-
</div>
|
1061
|
-
</div>
|
1062
|
-
</div>
|
1063
|
-
<div class="method">
|
1064
|
-
<div class="title">
|
1065
|
-
<a name="M000472"></a><b>nonuniq</b>()
|
1066
|
-
</div>
|
1067
|
-
<div class="sourcecode">
|
1068
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000472_source')" id="l_M000472_source">show source</a> ]</p>
|
1069
|
-
<div id="M000472_source" class="dyn-source">
|
1070
|
-
<pre>
|
1071
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 7</span>
|
1072
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq</span>
|
1073
|
-
<span class="ruby-identifier">h1</span> = {}
|
1074
|
-
<span class="ruby-identifier">h2</span> = {}
|
1075
|
-
<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1076
|
-
<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>]
|
1077
|
-
<span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
|
1078
|
-
}
|
1079
|
-
<span class="ruby-identifier">h2</span>.<span class="ruby-identifier">keys</span>
|
1080
|
-
<span class="ruby-keyword kw">end</span>
|
1081
|
-
</pre>
|
1082
|
-
</div>
|
1083
|
-
</div>
|
1084
|
-
</div>
|
1085
|
-
<div class="method">
|
1086
|
-
<div class="title">
|
1087
|
-
<a name="M000473"></a><b>nonuniq!</b>()
|
1088
|
-
</div>
|
1089
|
-
<div class="sourcecode">
|
1090
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000473_source')" id="l_M000473_source">show source</a> ]</p>
|
1091
|
-
<div id="M000473_source" class="dyn-source">
|
1092
|
-
<pre>
|
1093
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/nonuniq.rb, line 17</span>
|
1094
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nonuniq!</span>
|
1095
|
-
<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>)
|
1096
|
-
<span class="ruby-identifier">h1</span> = {}
|
1097
|
-
<span class="ruby-identifier">h2</span> = {}
|
1098
|
-
<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
1099
|
-
<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>]
|
1100
|
-
<span class="ruby-identifier">h1</span>[<span class="ruby-identifier">i</span>] = <span class="ruby-keyword kw">true</span>
|
1101
|
-
}
|
1102
|
-
<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>)
|
1103
|
-
<span class="ruby-keyword kw">end</span>
|
1104
|
-
</pre>
|
1105
|
-
</div>
|
1106
|
-
</div>
|
1107
|
-
</div>
|
1108
|
-
<div class="method">
|
1109
|
-
<div class="title">
|
1110
|
-
<a name="M000492"></a><b>occur</b>(n=nil) {|| ...}
|
1111
|
-
</div>
|
1112
|
-
<div class="description">
|
1113
|
-
<p>
|
1114
|
-
Returns an array of elements for the elements that occur n times. Or
|
1115
|
-
according to the results of a given block.
|
1116
|
-
</p>
|
1117
|
-
<pre>
|
1118
|
-
[1,1,2,3,3,4,5,5].occur(1) #=> [2,4]
|
1119
|
-
[1,1,2,3,3,4,5,5].occur(2) #=> [1,3,5]
|
1120
|
-
[1,1,2,3,3,4,5,5].occur(3) #=> []
|
1121
|
-
|
1122
|
-
[1,2,2,3,3,3].occur(1..1) #=> [1]
|
1123
|
-
[1,2,2,3,3,3].occur(2..3) #=> [2,3]
|
1124
|
-
|
1125
|
-
[1,1,2,3,3,4,5,5].occur { |n| n == 1 } #=> [2,4]
|
1126
|
-
[1,1,2,3,3,4,5,5].occur { |n| n > 1 } #=> [1,3,5]
|
1127
|
-
</pre>
|
1128
|
-
</div>
|
1129
|
-
<div class="sourcecode">
|
1130
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000492_source')" id="l_M000492_source">show source</a> ]</p>
|
1131
|
-
<div id="M000492_source" class="dyn-source">
|
1132
|
-
<pre>
|
1133
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/occur.rb, line 17</span>
|
1134
|
-
<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>
|
1135
|
-
<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> }
|
1136
|
-
<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>
|
1137
|
-
<span class="ruby-identifier">key</span> = <span class="ruby-identifier">item</span>
|
1138
|
-
<span class="ruby-identifier">result</span>[<span class="ruby-identifier">key</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">item</span>
|
1139
|
-
<span class="ruby-keyword kw">end</span>
|
1140
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1141
|
-
<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>) }
|
1142
|
-
<span class="ruby-keyword kw">else</span>
|
1143
|
-
<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>
|
1144
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Range</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">n</span>
|
1145
|
-
<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>) }
|
1146
|
-
<span class="ruby-keyword kw">else</span>
|
1147
|
-
<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> }
|
1148
|
-
<span class="ruby-keyword kw">end</span>
|
1149
|
-
<span class="ruby-keyword kw">end</span>
|
1150
|
-
<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>
|
1151
|
-
<span class="ruby-keyword kw">end</span>
|
1152
|
-
</pre>
|
1153
|
-
</div>
|
1154
|
-
</div>
|
1155
|
-
</div>
|
1156
|
-
<div class="method">
|
1157
|
-
<div class="title">
|
1158
|
-
<a name="M000484"></a><b>one?</b>( {|e| ...}
|
1159
|
-
</div>
|
1160
|
-
<div class="description">
|
1161
|
-
<p>
|
1162
|
-
Enumerable#one? returns <tt>true</tt> if and only if <em>exactly one</em>
|
1163
|
-
element in the collection satisfies the given predicate.
|
1164
|
-
</p>
|
1165
|
-
<p>
|
1166
|
-
If no predicate is provided, Enumerable#one? returns <tt>true</tt> if and
|
1167
|
-
only if <em>exactly one</em> element has a true value (i.e. not
|
1168
|
-
<tt>nil</tt> or <tt>false</tt>).
|
1169
|
-
</p>
|
1170
|
-
<pre>
|
1171
|
-
[].one? # false
|
1172
|
-
[nil].one? # false
|
1173
|
-
[5].one? # true
|
1174
|
-
[5,8,9].one? # false
|
1175
|
-
(1...10).one? { |n| n == 5 } # true
|
1176
|
-
(1...10).one? { |n| n < 5 } # false
|
1177
|
-
</pre>
|
1178
|
-
</div>
|
1179
|
-
<div class="sourcecode">
|
1180
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000484_source')" id="l_M000484_source">show source</a> ]</p>
|
1181
|
-
<div id="M000484_source" class="dyn-source">
|
1182
|
-
<pre>
|
1183
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/one.rb, line 20</span>
|
1184
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">one?</span> <span class="ruby-comment cmt"># :yield: e</span>
|
1185
|
-
<span class="ruby-identifier">matches</span> = <span class="ruby-value">0</span>
|
1186
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1187
|
-
<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>
|
1188
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">e</span>)
|
1189
|
-
<span class="ruby-identifier">matches</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
1190
|
-
<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>
|
1191
|
-
<span class="ruby-keyword kw">end</span>
|
1192
|
-
<span class="ruby-keyword kw">end</span>
|
1193
|
-
<span class="ruby-keyword kw">return</span> (<span class="ruby-identifier">matches</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>)
|
1194
|
-
<span class="ruby-keyword kw">else</span>
|
1195
|
-
<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> }
|
1196
|
-
<span class="ruby-keyword kw">end</span>
|
1197
|
-
<span class="ruby-keyword kw">end</span>
|
1198
|
-
</pre>
|
1199
|
-
</div>
|
1200
|
-
</div>
|
1201
|
-
</div>
|
1202
|
-
<div class="method">
|
1203
|
-
<div class="title">
|
1204
|
-
<a name="M000471"></a><b>partition_by</b>( {|| ...}
|
1205
|
-
</div>
|
1206
|
-
<div class="description">
|
1207
|
-
<p>
|
1208
|
-
See Enumerable#partition for the background. <a
|
1209
|
-
href="Enumerable.html#M000471">partition_by</a> is best explained by
|
1210
|
-
example.
|
1211
|
-
</p>
|
1212
|
-
<pre>
|
1213
|
-
(1..5).partition_by { |n| n % 3 }
|
1214
|
-
#=> { 0 => [3], 1 => [1, 4], 2 => [2,5] }
|
1215
|
-
|
1216
|
-
["I had", 1, "dollar and", 50, "cents"].partition_by { |e| e.class }
|
1217
|
-
#=> { String => ["I had","dollar and","cents"], Fixnum => [1,50] }
|
1218
|
-
</pre>
|
1219
|
-
<p>
|
1220
|
-
<a href="Enumerable.html#M000471">partition_by</a> is used to group items
|
1221
|
-
in a collection by something they have in common. The common factor is the
|
1222
|
-
key in the resulting hash, the array of like elements is the value.
|
1223
|
-
</p>
|
1224
|
-
</div>
|
1225
|
-
<div class="sourcecode">
|
1226
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000471_source')" id="l_M000471_source">show source</a> ]</p>
|
1227
|
-
<div id="M000471_source" class="dyn-source">
|
1228
|
-
<pre>
|
1229
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/partition_by.rb, line 19</span>
|
1230
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">partition_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
1231
|
-
<span class="ruby-identifier">result</span> = {}
|
1232
|
-
<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>
|
1233
|
-
<span class="ruby-identifier">value</span> = <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">e</span>
|
1234
|
-
(<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>
|
1235
|
-
<span class="ruby-keyword kw">end</span>
|
1236
|
-
<span class="ruby-identifier">result</span>
|
1237
|
-
<span class="ruby-keyword kw">end</span>
|
1238
|
-
</pre>
|
1239
|
-
</div>
|
1240
|
-
</div>
|
1241
|
-
</div>
|
1242
|
-
<div class="method">
|
1243
|
-
<div class="title">
|
1244
|
-
<a name="M000490"></a><b>permutation_number</b>(original_array=self.to_a.sort)
|
1245
|
-
</div>
|
1246
|
-
<div class="sourcecode">
|
1247
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000490_source')" id="l_M000490_source">show source</a> ]</p>
|
1248
|
-
<div id="M000490_source" class="dyn-source">
|
1249
|
-
<pre>
|
1250
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 22</span>
|
1251
|
-
<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>)
|
1252
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
1253
|
-
<span class="ruby-identifier">m</span> = <span class="ruby-value">1</span>
|
1254
|
-
<span class="ruby-identifier">v</span> = <span class="ruby-value">0</span>
|
1255
|
-
<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>)
|
1256
|
-
<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>
|
1257
|
-
<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>
|
1258
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">*=</span> <span class="ruby-identifier">i</span>
|
1259
|
-
<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>]
|
1260
|
-
<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>)
|
1261
|
-
}
|
1262
|
-
<span class="ruby-identifier">v</span>
|
1263
|
-
<span class="ruby-keyword kw">end</span>
|
1264
|
-
</pre>
|
1265
|
-
</div>
|
1266
|
-
</div>
|
1267
|
-
</div>
|
1268
|
-
<div class="method">
|
1269
|
-
<div class="title">
|
1270
|
-
<a name="M000489"></a><b>permute</b>(number)
|
1271
|
-
</div>
|
1272
|
-
<div class="sourcecode">
|
1273
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000489_source')" id="l_M000489_source">show source</a> ]</p>
|
1274
|
-
<div id="M000489_source" class="dyn-source">
|
1275
|
-
<pre>
|
1276
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/permute.rb, line 6</span>
|
1277
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">permute</span>(<span class="ruby-identifier">number</span>)
|
1278
|
-
<span class="ruby-identifier">arr</span> = <span class="ruby-identifier">to_a</span>
|
1279
|
-
<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>]
|
1280
|
-
<span class="ruby-identifier">nextfactor</span> = <span class="ruby-identifier">factor</span> = <span class="ruby-value">1</span>
|
1281
|
-
<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>
|
1282
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">i</span>
|
1283
|
-
<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>
|
1284
|
-
<span class="ruby-keyword kw">else</span>
|
1285
|
-
<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>)
|
1286
|
-
<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>)
|
1287
|
-
<span class="ruby-identifier">factor</span> = <span class="ruby-identifier">nextfactor</span>
|
1288
|
-
<span class="ruby-keyword kw">end</span>
|
1289
|
-
}
|
1290
|
-
<span class="ruby-identifier">out</span>
|
1291
|
-
<span class="ruby-keyword kw">end</span>
|
1292
|
-
</pre>
|
1293
|
-
</div>
|
1294
|
-
</div>
|
1295
|
-
</div>
|
1296
|
-
<div class="method">
|
1297
|
-
<div class="title">
|
1298
|
-
<a name="M000474"></a><b>probability</b>()
|
1299
|
-
</div>
|
1300
|
-
<div class="description">
|
1301
|
-
<p>
|
1302
|
-
Generates a hash mapping each unique symbol in the array to the relative
|
1303
|
-
frequency, i.e. the probablity, of it appearence.
|
1304
|
-
</p>
|
1305
|
-
</div>
|
1306
|
-
<div class="sourcecode">
|
1307
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000474_source')" id="l_M000474_source">show source</a> ]</p>
|
1308
|
-
<div id="M000474_source" class="dyn-source">
|
1309
|
-
<pre>
|
1310
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/probability.rb, line 10</span>
|
1311
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">probability</span>
|
1312
|
-
<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>)
|
1313
|
-
<span class="ruby-identifier">size</span> = <span class="ruby-value">0</span><span class="ruby-value">.0</span>
|
1314
|
-
<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>
|
1315
|
-
<span class="ruby-identifier">probs</span>[<span class="ruby-identifier">e</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
|
1316
|
-
<span class="ruby-identifier">size</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1.0</span>
|
1317
|
-
<span class="ruby-keyword kw">end</span>
|
1318
|
-
<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> }
|
1319
|
-
<span class="ruby-identifier">probs</span>
|
1320
|
-
<span class="ruby-keyword kw">end</span>
|
1321
|
-
</pre>
|
1322
|
-
</div>
|
1323
|
-
</div>
|
1324
|
-
</div>
|
1325
|
-
<div class="method">
|
1326
|
-
<div class="title">
|
1327
|
-
<a name="M000486"></a><b>project</b>(&block)
|
1328
|
-
</div>
|
1329
|
-
<div class="sourcecode">
|
1330
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000486_source')" id="l_M000486_source">show source</a> ]</p>
|
1331
|
-
<div id="M000486_source" class="dyn-source">
|
1332
|
-
<pre>
|
1333
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/project.rb, line 7</span>
|
1334
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">project</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1335
|
-
<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>) }
|
1336
|
-
<span class="ruby-keyword kw">end</span>
|
1337
|
-
</pre>
|
1338
|
-
</div>
|
1339
|
-
</div>
|
1340
|
-
</div>
|
1341
|
-
<div class="method">
|
1342
|
-
<div class="title">
|
1343
|
-
<a name="M000479"></a><b>to_h</b>( &blk )
|
1344
|
-
</div>
|
1345
|
-
<div class="description">
|
1346
|
-
<p>
|
1347
|
-
Produces a hash from an <a href="Enumerable.html">Enumerable</a> with index
|
1348
|
-
for keys.
|
1349
|
-
</p>
|
1350
|
-
<pre>
|
1351
|
-
enu = 'a'..'b'
|
1352
|
-
enu.to_h #=> { 0=>'a', 1=>'b' }
|
1353
|
-
</pre>
|
1354
|
-
<p>
|
1355
|
-
If a block is passed, the hash values will be set by calling the block with
|
1356
|
-
the enumerated element and it’s counter.
|
1357
|
-
</p>
|
1358
|
-
<pre>
|
1359
|
-
enu = 'a'..'b'
|
1360
|
-
enu.to_h{ |e,i| e } #=> { 0=>'a', 1=>'b' }
|
1361
|
-
</pre>
|
1362
|
-
<p>
|
1363
|
-
See also <a href="Enumerable.html#M000466">graph</a>.
|
1364
|
-
</p>
|
1365
|
-
</div>
|
1366
|
-
<div class="sourcecode">
|
1367
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000479_source')" id="l_M000479_source">show source</a> ]</p>
|
1368
|
-
<div id="M000479_source" class="dyn-source">
|
1369
|
-
<pre>
|
1370
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/to_h.rb, line 18</span>
|
1371
|
-
<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> )
|
1372
|
-
<span class="ruby-identifier">h</span> = {}
|
1373
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1374
|
-
<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>) }
|
1375
|
-
<span class="ruby-keyword kw">else</span>
|
1376
|
-
<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> }
|
1377
|
-
<span class="ruby-keyword kw">end</span>
|
1378
|
-
<span class="ruby-identifier">h</span>
|
1379
|
-
<span class="ruby-keyword kw">end</span>
|
1380
|
-
</pre>
|
1381
|
-
</div>
|
1382
|
-
</div>
|
1383
|
-
</div>
|
1384
|
-
<div class="method">
|
1385
|
-
<div class="title">
|
1386
|
-
<a name="M000497"></a><b>uniq_by</b>( {|| ...}
|
1387
|
-
</div>
|
1388
|
-
<div class="description">
|
1389
|
-
<p>
|
1390
|
-
Like uniq, but determines uniqueness based on a given block.
|
1391
|
-
</p>
|
1392
|
-
<pre>
|
1393
|
-
(-5..5).to_a.uniq_by {|i| i*i }
|
1394
|
-
</pre>
|
1395
|
-
<p>
|
1396
|
-
produces
|
1397
|
-
</p>
|
1398
|
-
<pre>
|
1399
|
-
[-5, -4, -3, -2, -1, 0]
|
1400
|
-
</pre>
|
1401
|
-
</div>
|
1402
|
-
<div class="sourcecode">
|
1403
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000497_source')" id="l_M000497_source">show source</a> ]</p>
|
1404
|
-
<div id="M000497_source" class="dyn-source">
|
1405
|
-
<pre>
|
1406
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/uniq_by.rb, line 12</span>
|
1407
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uniq_by</span> <span class="ruby-comment cmt">#:yield:</span>
|
1408
|
-
<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>}
|
1409
|
-
<span class="ruby-keyword kw">end</span>
|
1410
|
-
</pre>
|
1411
|
-
</div>
|
1412
|
-
</div>
|
1413
|
-
</div>
|
1414
|
-
<div class="method">
|
1415
|
-
<div class="title">
|
1416
|
-
<a name="M000470"></a><b>where</b>(&block)
|
1417
|
-
</div>
|
1418
|
-
<div class="sourcecode">
|
1419
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000470_source')" id="l_M000470_source">show source</a> ]</p>
|
1420
|
-
<div id="M000470_source" class="dyn-source">
|
1421
|
-
<pre>
|
1422
|
-
<span class="ruby-comment cmt"># File lib/facets/core/enumerable/where.rb, line 7</span>
|
1423
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">where</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1424
|
-
<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>) }
|
1425
|
-
<span class="ruby-keyword kw">end</span>
|
1426
|
-
</pre>
|
1427
|
-
</div>
|
1428
|
-
</div>
|
1429
|
-
</div>
|
1430
|
-
</div>
|
1431
|
-
|
1432
|
-
</div>
|
1433
|
-
|
1434
|
-
</body>
|
1435
|
-
</html>
|