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,157 +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: Float</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 />Float</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/float/round_at_rb.html">lib/facets/core/float/round_at.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/float/round_to_rb.html">lib/facets/core/float/round_to.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/float/round_off_rb.html">lib/facets/core/float/round_off.rb</a>
|
63
|
-
</td>
|
64
|
-
</tr>
|
65
|
-
<tr>
|
66
|
-
<td>Parent:</td>
|
67
|
-
<td>
|
68
|
-
<a href="Object.html">
|
69
|
-
Object
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</td>
|
75
|
-
</tr>
|
76
|
-
</table>
|
77
|
-
<!-- banner header -->
|
78
|
-
|
79
|
-
<div id="bodyContent">
|
80
|
-
<div id="content">
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<div class="sectiontitle">Methods</div>
|
86
|
-
<ul>
|
87
|
-
<li><a href="#M000204">round_at</a></li>
|
88
|
-
<li><a href="#M000205">round_to</a></li>
|
89
|
-
</ul>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
<div class="sectiontitle">Public Instance methods</div>
|
97
|
-
<div class="method">
|
98
|
-
<div class="title">
|
99
|
-
<a name="M000204"></a><b>round_at</b>( d )
|
100
|
-
</div>
|
101
|
-
<div class="description">
|
102
|
-
<p>
|
103
|
-
Rounds to the given decimal position.
|
104
|
-
</p>
|
105
|
-
<pre>
|
106
|
-
4.555.round_at(0) #=> 5.0
|
107
|
-
4.555.round_at(1) #=> 4.6
|
108
|
-
4.555.round_at(2) #=> 4.56
|
109
|
-
4.555.round_at(3) #=> 4.555
|
110
|
-
</pre>
|
111
|
-
</div>
|
112
|
-
<div class="sourcecode">
|
113
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000204_source')" id="l_M000204_source">show source</a> ]</p>
|
114
|
-
<div id="M000204_source" class="dyn-source">
|
115
|
-
<pre>
|
116
|
-
<span class="ruby-comment cmt"># File lib/facets/core/float/round_at.rb, line 13</span>
|
117
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_at</span>( <span class="ruby-identifier">d</span> ) <span class="ruby-comment cmt">#d=0</span>
|
118
|
-
(<span class="ruby-keyword kw">self</span> <span class="ruby-operator">*</span> (<span class="ruby-value">10.0</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">d</span>)).<span class="ruby-identifier">round_off</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> (<span class="ruby-value">10.0</span> <span class="ruby-operator">**</span> <span class="ruby-identifier">d</span>)
|
119
|
-
<span class="ruby-keyword kw">end</span>
|
120
|
-
</pre>
|
121
|
-
</div>
|
122
|
-
</div>
|
123
|
-
</div>
|
124
|
-
<div class="method">
|
125
|
-
<div class="title">
|
126
|
-
<a name="M000205"></a><b>round_to</b>( n )
|
127
|
-
</div>
|
128
|
-
<div class="description">
|
129
|
-
<p>
|
130
|
-
Rounds to the nearest _n_th degree.
|
131
|
-
</p>
|
132
|
-
<pre>
|
133
|
-
4.555.round_to(1) #=> 5.0
|
134
|
-
4.555.round_to(0.1) #=> 4.6
|
135
|
-
4.555.round_to(0.01) #=> 4.56
|
136
|
-
4.555.round_to(0) #=> 4.555
|
137
|
-
</pre>
|
138
|
-
</div>
|
139
|
-
<div class="sourcecode">
|
140
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000205_source')" id="l_M000205_source">show source</a> ]</p>
|
141
|
-
<div id="M000205_source" class="dyn-source">
|
142
|
-
<pre>
|
143
|
-
<span class="ruby-comment cmt"># File lib/facets/core/float/round_to.rb, line 13</span>
|
144
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">round_to</span>( <span class="ruby-identifier">n</span> ) <span class="ruby-comment cmt">#n=1</span>
|
145
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
|
146
|
-
(<span class="ruby-keyword kw">self</span> <span class="ruby-operator">*</span> (<span class="ruby-value">1.0</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n</span>)).<span class="ruby-identifier">round_off</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> (<span class="ruby-value">1.0</span> <span class="ruby-operator">/</span> <span class="ruby-identifier">n</span>)
|
147
|
-
<span class="ruby-keyword kw">end</span>
|
148
|
-
</pre>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
</div>
|
153
|
-
|
154
|
-
</div>
|
155
|
-
|
156
|
-
</body>
|
157
|
-
</html>
|
@@ -1,171 +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: Gem</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 />Gem</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/gem/self/active_rb.html">lib/facets/core/gem/self/active.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/gem/self/gemspec_rb.html">lib/facets/core/gem/self/gemspec.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/gem/self/gempath_rb.html">lib/facets/core/gem/self/gempath.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/gem/self/gemdir_rb.html">lib/facets/core/gem/self/gemdir.rb</a>
|
64
|
-
</td>
|
65
|
-
</tr>
|
66
|
-
</table>
|
67
|
-
</td>
|
68
|
-
</tr>
|
69
|
-
</table>
|
70
|
-
<!-- banner header -->
|
71
|
-
|
72
|
-
<div id="bodyContent">
|
73
|
-
<div id="content">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
<div class="sectiontitle">Methods</div>
|
79
|
-
<ul>
|
80
|
-
<li><a href="#M000397">active?</a></li>
|
81
|
-
<li><a href="#M000400">gemdir</a></li>
|
82
|
-
<li><a href="#M000399">gempath</a></li>
|
83
|
-
<li><a href="#M000398">gemspec</a></li>
|
84
|
-
</ul>
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<div class="sectiontitle">Public Class methods</div>
|
92
|
-
<div class="method">
|
93
|
-
<div class="title">
|
94
|
-
<a name="M000397"></a><b>active?</b>(gemname)
|
95
|
-
</div>
|
96
|
-
<div class="sourcecode">
|
97
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000397_source')" id="l_M000397_source">show source</a> ]</p>
|
98
|
-
<div id="M000397_source" class="dyn-source">
|
99
|
-
<pre>
|
100
|
-
<span class="ruby-comment cmt"># File lib/facets/core/gem/self/active.rb, line 4</span>
|
101
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">active?</span>(<span class="ruby-identifier">gemname</span>)
|
102
|
-
<span class="ruby-ivar">@loaded_specs</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
103
|
-
<span class="ruby-ivar">@loaded_specs</span>.<span class="ruby-identifier">key?</span> <span class="ruby-identifier">gemname</span>
|
104
|
-
<span class="ruby-keyword kw">end</span>
|
105
|
-
</pre>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
</div>
|
109
|
-
<div class="method">
|
110
|
-
<div class="title">
|
111
|
-
<a name="M000399"></a><b>gempath</b>(gemname, subdir=nil)
|
112
|
-
</div>
|
113
|
-
<div class="sourcecode">
|
114
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000399_source')" id="l_M000399_source">show source</a> ]</p>
|
115
|
-
<div id="M000399_source" class="dyn-source">
|
116
|
-
<pre>
|
117
|
-
<span class="ruby-comment cmt"># File lib/facets/core/gem/self/gempath.rb, line 6</span>
|
118
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gempath</span>(<span class="ruby-identifier">gemname</span>, <span class="ruby-identifier">subdir</span>=<span class="ruby-keyword kw">nil</span>)
|
119
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active?</span>(<span class="ruby-identifier">gemname</span>)
|
120
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">subdir</span>
|
121
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>( <span class="ruby-ivar">@loaded_specs</span>[<span class="ruby-identifier">gemname</span>].<span class="ruby-identifier">full_gem_path</span>, <span class="ruby-identifier">subdir</span> )
|
122
|
-
<span class="ruby-keyword kw">else</span>
|
123
|
-
<span class="ruby-ivar">@loaded_specs</span>[<span class="ruby-identifier">gemname</span>].<span class="ruby-identifier">full_gem_path</span>
|
124
|
-
<span class="ruby-keyword kw">end</span>
|
125
|
-
<span class="ruby-keyword kw">end</span>
|
126
|
-
<span class="ruby-keyword kw">end</span>
|
127
|
-
</pre>
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
<div class="method">
|
132
|
-
<div class="title">
|
133
|
-
<a name="M000398"></a><b>gemspec</b>(gemname)
|
134
|
-
</div>
|
135
|
-
<div class="sourcecode">
|
136
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000398_source')" id="l_M000398_source">show source</a> ]</p>
|
137
|
-
<div id="M000398_source" class="dyn-source">
|
138
|
-
<pre>
|
139
|
-
<span class="ruby-comment cmt"># File lib/facets/core/gem/self/gemspec.rb, line 6</span>
|
140
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gemspec</span>(<span class="ruby-identifier">gemname</span>)
|
141
|
-
<span class="ruby-ivar">@loaded_specs</span>[<span class="ruby-identifier">gemname</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active?</span>(<span class="ruby-identifier">gemname</span>)
|
142
|
-
<span class="ruby-keyword kw">end</span>
|
143
|
-
</pre>
|
144
|
-
</div>
|
145
|
-
</div>
|
146
|
-
</div>
|
147
|
-
<div class="sectiontitle">Public Instance methods</div>
|
148
|
-
<div class="method">
|
149
|
-
<div class="title">
|
150
|
-
<a name="M000400"></a><b>gemdir</b>(gemname, dir)
|
151
|
-
</div>
|
152
|
-
<div class="sourcecode">
|
153
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000400_source')" id="l_M000400_source">show source</a> ]</p>
|
154
|
-
<div id="M000400_source" class="dyn-source">
|
155
|
-
<pre>
|
156
|
-
<span class="ruby-comment cmt"># File lib/facets/core/gem/self/gemdir.rb, line 5</span>
|
157
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">gemdir</span>(<span class="ruby-identifier">gemname</span>, <span class="ruby-identifier">dir</span>)
|
158
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">active?</span>(<span class="ruby-identifier">gemname</span>)
|
159
|
-
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">gempath</span>, <span class="ruby-identifier">dir</span>)
|
160
|
-
<span class="ruby-keyword kw">end</span>
|
161
|
-
<span class="ruby-keyword kw">end</span>
|
162
|
-
</pre>
|
163
|
-
</div>
|
164
|
-
</div>
|
165
|
-
</div>
|
166
|
-
</div>
|
167
|
-
|
168
|
-
</div>
|
169
|
-
|
170
|
-
</body>
|
171
|
-
</html>
|
@@ -1,1657 +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: Hash</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 />Hash</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/hash/collate_rb.html">lib/facets/core/hash/collate.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/hash/assert_has_keys_rb.html">lib/facets/core/hash/assert_has_keys.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/hash/each_with_key_rb.html">lib/facets/core/hash/each_with_key.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/hash/join_rb.html">lib/facets/core/hash/join.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/hash/at_rb.html">lib/facets/core/hash/at.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/hash/each_rb.html">lib/facets/core/hash/each.rb</a>
|
66
|
-
<a href="../files/lib/facets/core/hash/each_with_index_rb.html">lib/facets/core/hash/each_with_index.rb</a>
|
67
|
-
<a href="../files/lib/facets/core/hash/graph_rb.html">lib/facets/core/hash/graph.rb</a>
|
68
|
-
<a href="../files/lib/facets/core/hash/to_ostruct_rb.html">lib/facets/core/hash/to_ostruct.rb</a>
|
69
|
-
<a href="../files/lib/facets/core/hash/update_values_rb.html">lib/facets/core/hash/update_values.rb</a>
|
70
|
-
<a href="../files/lib/facets/core/hash/inverse_rb.html">lib/facets/core/hash/inverse.rb</a>
|
71
|
-
<a href="../files/lib/facets/core/hash/rand_value_rb.html">lib/facets/core/hash/rand_value.rb</a>
|
72
|
-
<a href="../files/lib/facets/core/hash/assert_has_only_keys_rb.html">lib/facets/core/hash/assert_has_only_keys.rb</a>
|
73
|
-
<a href="../files/lib/facets/core/hash/keys_to_sym_rb.html">lib/facets/core/hash/keys_to_sym.rb</a>
|
74
|
-
<a href="../files/lib/facets/core/hash/delete_unless_rb.html">lib/facets/core/hash/delete_unless.rb</a>
|
75
|
-
<a href="../files/lib/facets/core/hash/has_only_keys_rb.html">lib/facets/core/hash/has_only_keys.rb</a>
|
76
|
-
<a href="../files/lib/facets/core/hash/replace_each_rb.html">lib/facets/core/hash/replace_each.rb</a>
|
77
|
-
<a href="../files/lib/facets/core/hash/swap_rb.html">lib/facets/core/hash/swap.rb</a>
|
78
|
-
<a href="../files/lib/facets/core/hash/rand_key_rb.html">lib/facets/core/hash/rand_key.rb</a>
|
79
|
-
<a href="../files/lib/facets/core/hash/to_h_rb.html">lib/facets/core/hash/to_h.rb</a>
|
80
|
-
<a href="../files/lib/facets/core/hash/keys_to_iv_rb.html">lib/facets/core/hash/keys_to_iv.rb</a>
|
81
|
-
<a href="../files/lib/facets/core/hash/slice_rb.html">lib/facets/core/hash/slice.rb</a>
|
82
|
-
<a href="../files/lib/facets/core/hash/traverse_rb.html">lib/facets/core/hash/traverse.rb</a>
|
83
|
-
<a href="../files/lib/facets/core/hash/shuffle_rb.html">lib/facets/core/hash/shuffle.rb</a>
|
84
|
-
<a href="../files/lib/facets/core/hash/alias_rb.html">lib/facets/core/hash/alias.rb</a>
|
85
|
-
<a href="../files/lib/facets/core/hash/op_fetch_rb.html">lib/facets/core/hash/op_fetch.rb</a>
|
86
|
-
<a href="../files/lib/facets/core/hash/has_keys_rb.html">lib/facets/core/hash/has_keys.rb</a>
|
87
|
-
<a href="../files/lib/facets/core/hash/to_ostruct_recurse_rb.html">lib/facets/core/hash/to_ostruct_recurse.rb</a>
|
88
|
-
<a href="../files/lib/facets/core/hash/swapkey_rb.html">lib/facets/core/hash/swapkey.rb</a>
|
89
|
-
<a href="../files/lib/facets/core/hash/keys_to_s_rb.html">lib/facets/core/hash/keys_to_s.rb</a>
|
90
|
-
<a href="../files/lib/facets/core/hash/weave_rb.html">lib/facets/core/hash/weave.rb</a>
|
91
|
-
<a href="../files/lib/facets/core/hash/op_lshift_rb.html">lib/facets/core/hash/op_lshift.rb</a>
|
92
|
-
<a href="../files/lib/facets/core/hash/update_keys_rb.html">lib/facets/core/hash/update_keys.rb</a>
|
93
|
-
<a href="../files/lib/facets/core/hash/rand_pair_rb.html">lib/facets/core/hash/rand_pair.rb</a>
|
94
|
-
<a href="../files/lib/facets/core/hash/update_each_rb.html">lib/facets/core/hash/update_each.rb</a>
|
95
|
-
<a href="../files/lib/facets/core/hash/to_proc_rb.html">lib/facets/core/hash/to_proc.rb</a>
|
96
|
-
<a href="../files/lib/facets/core/hash/self/zipnew_rb.html">lib/facets/core/hash/self/zipnew.rb</a>
|
97
|
-
</td>
|
98
|
-
</tr>
|
99
|
-
<tr>
|
100
|
-
<td>Parent:</td>
|
101
|
-
<td>
|
102
|
-
<a href="Object.html">
|
103
|
-
Object
|
104
|
-
</a>
|
105
|
-
</td>
|
106
|
-
</tr>
|
107
|
-
</table>
|
108
|
-
</td>
|
109
|
-
</tr>
|
110
|
-
</table>
|
111
|
-
<!-- banner header -->
|
112
|
-
|
113
|
-
<div id="bodyContent">
|
114
|
-
<div id="content">
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
<div class="sectiontitle">Methods</div>
|
120
|
-
<ul>
|
121
|
-
<li><a href="#M000086">[]</a></li>
|
122
|
-
<li><a href="#M000087">[]=</a></li>
|
123
|
-
<li><a href="#M000085">alias!</a></li>
|
124
|
-
<li><a href="#M000050">assert_has_keys</a></li>
|
125
|
-
<li><a href="#M000064">assert_has_only_keys</a></li>
|
126
|
-
<li><a href="#M000062">at_rand</a></li>
|
127
|
-
<li><a href="#M000063">at_rand!</a></li>
|
128
|
-
<li><a href="#M000048">collate</a></li>
|
129
|
-
<li><a href="#M000049">collate!</a></li>
|
130
|
-
<li><a href="#M000069">delete_unless</a></li>
|
131
|
-
<li><a href="#M000053">each</a></li>
|
132
|
-
<li><a href="#M000054">each_with_index</a></li>
|
133
|
-
<li><a href="#M000051">each_with_key</a></li>
|
134
|
-
<li><a href="#M000055">graph!</a></li>
|
135
|
-
<li><a href="#M000088">has_keys?</a></li>
|
136
|
-
<li><a href="#M000070">has_only_keys?</a></li>
|
137
|
-
<li><a href="#M000058">inverse</a></li>
|
138
|
-
<li><a href="#M000052">join</a></li>
|
139
|
-
<li><a href="#M000077">keys_to_iv</a></li>
|
140
|
-
<li><a href="#M000079">keys_to_iv!</a></li>
|
141
|
-
<li><a href="#M000091">keys_to_s</a></li>
|
142
|
-
<li><a href="#M000093">keys_to_s!</a></li>
|
143
|
-
<li><a href="#M000065">keys_to_sym</a></li>
|
144
|
-
<li><a href="#M000067">keys_to_sym!</a></li>
|
145
|
-
<li><a href="#M000061">pick</a></li>
|
146
|
-
<li><a href="#M000075">pick_key</a></li>
|
147
|
-
<li><a href="#M000099">pick_pair</a></li>
|
148
|
-
<li><a href="#M000073">rand_key</a></li>
|
149
|
-
<li><a href="#M000074">rand_key!</a></li>
|
150
|
-
<li><a href="#M000097">rand_pair</a></li>
|
151
|
-
<li><a href="#M000098">rand_pair!</a></li>
|
152
|
-
<li><a href="#M000059">rand_value</a></li>
|
153
|
-
<li><a href="#M000060">rand_value!</a></li>
|
154
|
-
<li><a href="#M000071">replace_each</a></li>
|
155
|
-
<li><a href="#M000083">shuffle</a></li>
|
156
|
-
<li><a href="#M000084">shuffle!</a></li>
|
157
|
-
<li><a href="#M000092">stringify_keys</a></li>
|
158
|
-
<li><a href="#M000094">stringify_keys!</a></li>
|
159
|
-
<li><a href="#M000072">swap!</a></li>
|
160
|
-
<li><a href="#M000090">swapkey!</a></li>
|
161
|
-
<li><a href="#M000066">symbolize_keys</a></li>
|
162
|
-
<li><a href="#M000068">symbolize_keys!</a></li>
|
163
|
-
<li><a href="#M000076">to_h</a></li>
|
164
|
-
<li><a href="#M000056">to_ostruct</a></li>
|
165
|
-
<li><a href="#M000089">to_ostruct_recurse</a></li>
|
166
|
-
<li><a href="#M000101">to_proc</a></li>
|
167
|
-
<li><a href="#M000102">to_proc_with_reponse</a></li>
|
168
|
-
<li><a href="#M000081">traverse</a></li>
|
169
|
-
<li><a href="#M000082">traverse!</a></li>
|
170
|
-
<li><a href="#M000100">update_each</a></li>
|
171
|
-
<li><a href="#M000096">update_keys</a></li>
|
172
|
-
<li><a href="#M000057">update_values</a></li>
|
173
|
-
<li><a href="#M000078">variablize_keys</a></li>
|
174
|
-
<li><a href="#M000080">variablize_keys!</a></li>
|
175
|
-
<li><a href="#M000095">weave</a></li>
|
176
|
-
<li><a href="#M000103">zipnew</a></li>
|
177
|
-
</ul>
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
<div class="sectiontitle">Public Class methods</div>
|
185
|
-
<div class="method">
|
186
|
-
<div class="title">
|
187
|
-
<a name="M000103"></a><b>zipnew</b>(keys,values)
|
188
|
-
</div>
|
189
|
-
<div class="description">
|
190
|
-
<p>
|
191
|
-
Creates a new hash from two arrays —a keys array and a values array.
|
192
|
-
</p>
|
193
|
-
<pre>
|
194
|
-
Hash.zipnew(["a","b","c"], [1,2,3])
|
195
|
-
#=> { "a"=>1, "b"=>2, "c"=>3 }
|
196
|
-
</pre>
|
197
|
-
</div>
|
198
|
-
<div class="sourcecode">
|
199
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000103_source')" id="l_M000103_source">show source</a> ]</p>
|
200
|
-
<div id="M000103_source" class="dyn-source">
|
201
|
-
<pre>
|
202
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/self/zipnew.rb, line 9</span>
|
203
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zipnew</span>(<span class="ruby-identifier">keys</span>,<span class="ruby-identifier">values</span>) <span class="ruby-comment cmt"># or some better name</span>
|
204
|
-
<span class="ruby-identifier">h</span> = {}
|
205
|
-
<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">times</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[ <span class="ruby-identifier">keys</span>[<span class="ruby-identifier">i</span>] ] = <span class="ruby-identifier">values</span>[<span class="ruby-identifier">i</span>] }
|
206
|
-
<span class="ruby-identifier">h</span>
|
207
|
-
<span class="ruby-keyword kw">end</span>
|
208
|
-
</pre>
|
209
|
-
</div>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
<div class="sectiontitle">Public Instance methods</div>
|
213
|
-
<div class="method">
|
214
|
-
<div class="title">
|
215
|
-
<a name="M000086"></a><b>[]</b>( *sliceKeys )
|
216
|
-
</div>
|
217
|
-
<div class="description">
|
218
|
-
<p>
|
219
|
-
Adds slicing to <a href="Hash.html">Hash</a>#[]. If more than one key
|
220
|
-
arguments is given to <tt><a href="Hash.html">Hash</a>#[]</tt>, the return
|
221
|
-
value will be an array of the corresponding values.
|
222
|
-
</p>
|
223
|
-
<pre>
|
224
|
-
h = { :a => 1, :b => 2, :c => 3 }
|
225
|
-
h[:a] #=> 1
|
226
|
-
h[:a, :b] #=> [1,2]
|
227
|
-
</pre>
|
228
|
-
</div>
|
229
|
-
<div class="sourcecode">
|
230
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000086_source')" id="l_M000086_source">show source</a> ]</p>
|
231
|
-
<div id="M000086_source" class="dyn-source">
|
232
|
-
<pre>
|
233
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/op_fetch.rb, line 13</span>
|
234
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">sliceKeys</span> )
|
235
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sliceKeys</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
|
236
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">at</span>( <span class="ruby-identifier">sliceKeys</span>[<span class="ruby-value">0</span>] )
|
237
|
-
<span class="ruby-keyword kw">else</span>
|
238
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">values_at</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">sliceKeys</span> )
|
239
|
-
<span class="ruby-keyword kw">end</span>
|
240
|
-
<span class="ruby-keyword kw">end</span>
|
241
|
-
</pre>
|
242
|
-
</div>
|
243
|
-
</div>
|
244
|
-
</div>
|
245
|
-
<div class="method">
|
246
|
-
<div class="title">
|
247
|
-
<a name="M000087"></a><b>[]=</b>( *args )
|
248
|
-
</div>
|
249
|
-
<div class="description">
|
250
|
-
<p>
|
251
|
-
Add slicing to element assignment operator.
|
252
|
-
</p>
|
253
|
-
<pre>
|
254
|
-
h = {:a=>1, :b=>2, :c=>3}
|
255
|
-
|
256
|
-
h[:a] = 9 #=> 9
|
257
|
-
h #=> {:a=>9, :b=>2, :c=>3}
|
258
|
-
|
259
|
-
h[:a, :c] = [10,11] #=> [10,11]
|
260
|
-
h #=> {:a=>10, :b=>2, :c=>11}
|
261
|
-
</pre>
|
262
|
-
</div>
|
263
|
-
<div class="sourcecode">
|
264
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000087_source')" id="l_M000087_source">show source</a> ]</p>
|
265
|
-
<div id="M000087_source" class="dyn-source">
|
266
|
-
<pre>
|
267
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/op_fetch.rb, line 31</span>
|
268
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
269
|
-
<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">2</span>
|
270
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">store</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span> )
|
271
|
-
<span class="ruby-keyword kw">end</span>
|
272
|
-
<span class="ruby-identifier">aVals</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>
|
273
|
-
<span class="ruby-identifier">aVals</span> = [<span class="ruby-identifier">aVals</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">aVals</span>.<span class="ruby-identifier">kind_of?</span>( <span class="ruby-constant">Array</span> )
|
274
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each_index</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-identifier">store</span>( <span class="ruby-identifier">args</span>[<span class="ruby-identifier">i</span>], <span class="ruby-identifier">aVals</span>[<span class="ruby-identifier">i</span>] ) }
|
275
|
-
<span class="ruby-keyword kw">end</span>
|
276
|
-
</pre>
|
277
|
-
</div>
|
278
|
-
</div>
|
279
|
-
</div>
|
280
|
-
<div class="method">
|
281
|
-
<div class="title">
|
282
|
-
<a name="M000085"></a><b>alias!</b>( newkey, oldkey )
|
283
|
-
</div>
|
284
|
-
<div class="description">
|
285
|
-
<p>
|
286
|
-
Modifies the receiving <a href="Hash.html">Hash</a> so that the value
|
287
|
-
previously referred to by <em>oldkey</em> is also referenced by
|
288
|
-
<em>newkey</em>; <em>oldkey</em> is retained in the <a
|
289
|
-
href="Hash.html">Hash</a>. If <em>oldkey</em> does not exist as a key in
|
290
|
-
the <a href="Hash.html">Hash</a>, no change is effected.
|
291
|
-
</p>
|
292
|
-
<p>
|
293
|
-
Returns a reference to the <a href="Hash.html">Hash</a>.
|
294
|
-
</p>
|
295
|
-
<pre>
|
296
|
-
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
297
|
-
foo.alias!('name',:name) => { :name=>'Gavin', 'name'=>'Gavin', 'wife'=>:Lisa }
|
298
|
-
|
299
|
-
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
300
|
-
foo.alias!('spouse','wife') => { :name=>'Gavin', 'wife'=>:Lisa, 'spouse'=>:Lisa }
|
301
|
-
|
302
|
-
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
303
|
-
foo.alias!('bar','foo') => { :name=>'Gavin', 'wife'=>:Lisa }
|
304
|
-
</pre>
|
305
|
-
<p>
|
306
|
-
Note that if the <em>oldkey</em> is reassigned, the reference will no
|
307
|
-
longer exist, and the <em>newkey</em> will remain as it was.
|
308
|
-
</p>
|
309
|
-
</div>
|
310
|
-
<div class="sourcecode">
|
311
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000085_source')" id="l_M000085_source">show source</a> ]</p>
|
312
|
-
<div id="M000085_source" class="dyn-source">
|
313
|
-
<pre>
|
314
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/alias.rb, line 23</span>
|
315
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alias!</span>( <span class="ruby-identifier">newkey</span>, <span class="ruby-identifier">oldkey</span> )
|
316
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">newkey</span>] = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">oldkey</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">oldkey</span>)
|
317
|
-
<span class="ruby-keyword kw">self</span>
|
318
|
-
<span class="ruby-keyword kw">end</span>
|
319
|
-
</pre>
|
320
|
-
</div>
|
321
|
-
</div>
|
322
|
-
</div>
|
323
|
-
<div class="method">
|
324
|
-
<div class="title">
|
325
|
-
<a name="M000050"></a><b>assert_has_keys</b>(*check_keys)
|
326
|
-
</div>
|
327
|
-
<div class="description">
|
328
|
-
<p>
|
329
|
-
Returns true is hash has the given keys, otherwise throws an ArgumentError.
|
330
|
-
</p>
|
331
|
-
<pre>
|
332
|
-
h = { :a => 1, :b => 2 }
|
333
|
-
h.assert_has_keys( :a ) #=> true
|
334
|
-
h.assert_has_keys( :c ) #=> ArgumentError
|
335
|
-
</pre>
|
336
|
-
</div>
|
337
|
-
<div class="sourcecode">
|
338
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show source</a> ]</p>
|
339
|
-
<div id="M000050_source" class="dyn-source">
|
340
|
-
<pre>
|
341
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/assert_has_keys.rb, line 12</span>
|
342
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_has_keys</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
343
|
-
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"does not have key(s)"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">has_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
344
|
-
<span class="ruby-keyword kw">end</span>
|
345
|
-
</pre>
|
346
|
-
</div>
|
347
|
-
</div>
|
348
|
-
</div>
|
349
|
-
<div class="method">
|
350
|
-
<div class="title">
|
351
|
-
<a name="M000064"></a><b>assert_has_only_keys</b>(*check_keys)
|
352
|
-
</div>
|
353
|
-
<div class="description">
|
354
|
-
<p>
|
355
|
-
Returns true is hash has only then given keys, otherwise throws an
|
356
|
-
ArgumentError.
|
357
|
-
</p>
|
358
|
-
<pre>
|
359
|
-
h = { :a => 1, :b => 2 }
|
360
|
-
h.assert_has_only_keys( :a, :b ) #=> true
|
361
|
-
h.assert_has_only_keys( :a ) #=> ArgumentError
|
362
|
-
</pre>
|
363
|
-
</div>
|
364
|
-
<div class="sourcecode">
|
365
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p>
|
366
|
-
<div id="M000064_source" class="dyn-source">
|
367
|
-
<pre>
|
368
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/assert_has_only_keys.rb, line 12</span>
|
369
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">assert_has_only_keys</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
370
|
-
<span class="ruby-identifier">raise</span>(<span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"has unexpected key(s)"</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">has_only_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
371
|
-
<span class="ruby-keyword kw">end</span>
|
372
|
-
</pre>
|
373
|
-
</div>
|
374
|
-
</div>
|
375
|
-
</div>
|
376
|
-
<div class="method">
|
377
|
-
<div class="title">
|
378
|
-
<a name="M000062"></a><b>at_rand</b>()
|
379
|
-
</div>
|
380
|
-
<div class="description">
|
381
|
-
<p>
|
382
|
-
Alias for <a href="Hash.html#M000059">rand_value</a>
|
383
|
-
</p>
|
384
|
-
</div>
|
385
|
-
</div>
|
386
|
-
<div class="method">
|
387
|
-
<div class="title">
|
388
|
-
<a name="M000063"></a><b>at_rand!</b>()
|
389
|
-
</div>
|
390
|
-
<div class="description">
|
391
|
-
<p>
|
392
|
-
Alias for <a href="Hash.html#M000060">rand_value!</a>
|
393
|
-
</p>
|
394
|
-
</div>
|
395
|
-
</div>
|
396
|
-
<div class="method">
|
397
|
-
<div class="title">
|
398
|
-
<a name="M000048"></a><b>collate</b>( {|| ...}
|
399
|
-
</div>
|
400
|
-
<div class="description">
|
401
|
-
<p>
|
402
|
-
Returns a new hash built by iterating through each key,value pair and
|
403
|
-
updating the new hash.
|
404
|
-
</p>
|
405
|
-
</div>
|
406
|
-
<div class="sourcecode">
|
407
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p>
|
408
|
-
<div id="M000048_source" class="dyn-source">
|
409
|
-
<pre>
|
410
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/collate.rb, line 12</span>
|
411
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate</span> <span class="ruby-comment cmt"># :yield:</span>
|
412
|
-
<span class="ruby-identifier">newhash</span> = {}
|
413
|
-
<span class="ruby-identifier">each_pair</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">newhash</span>.<span class="ruby-identifier">update</span>( <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) ) }
|
414
|
-
<span class="ruby-identifier">newhash</span>
|
415
|
-
<span class="ruby-keyword kw">end</span>
|
416
|
-
</pre>
|
417
|
-
</div>
|
418
|
-
</div>
|
419
|
-
</div>
|
420
|
-
<div class="method">
|
421
|
-
<div class="title">
|
422
|
-
<a name="M000049"></a><b>collate!</b>(&yld)
|
423
|
-
</div>
|
424
|
-
<div class="description">
|
425
|
-
<p>
|
426
|
-
In place version of <a href="Hash.html#M000048">collate</a>.
|
427
|
-
</p>
|
428
|
-
</div>
|
429
|
-
<div class="sourcecode">
|
430
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p>
|
431
|
-
<div id="M000049_source" class="dyn-source">
|
432
|
-
<pre>
|
433
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/collate.rb, line 19</span>
|
434
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">collate!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
435
|
-
<span class="ruby-identifier">replace</span>( <span class="ruby-identifier">collate</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>) )
|
436
|
-
<span class="ruby-keyword kw">end</span>
|
437
|
-
</pre>
|
438
|
-
</div>
|
439
|
-
</div>
|
440
|
-
</div>
|
441
|
-
<div class="method">
|
442
|
-
<div class="title">
|
443
|
-
<a name="M000069"></a><b>delete_unless</b>(&block)
|
444
|
-
</div>
|
445
|
-
<div class="sourcecode">
|
446
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
|
447
|
-
<div id="M000069_source" class="dyn-source">
|
448
|
-
<pre>
|
449
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/delete_unless.rb, line 3</span>
|
450
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_unless</span> (<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
451
|
-
<span class="ruby-identifier">delete_if</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>) }
|
452
|
-
<span class="ruby-keyword kw">end</span>
|
453
|
-
</pre>
|
454
|
-
</div>
|
455
|
-
</div>
|
456
|
-
</div>
|
457
|
-
<div class="method">
|
458
|
-
<div class="title">
|
459
|
-
<a name="M000053"></a><b>each</b>() {|v| ...}
|
460
|
-
</div>
|
461
|
-
<div class="description">
|
462
|
-
<p>
|
463
|
-
A "smarter" hash<a href="Hash.html#M000053">each</a> which
|
464
|
-
iterates through each <em>value</em> if only one block parameter is given.
|
465
|
-
</p>
|
466
|
-
<pre>
|
467
|
-
{:a=>"a", 2=>"b", "x"=>"c"}.each{ |v| puts v }
|
468
|
-
</pre>
|
469
|
-
<p>
|
470
|
-
<em>produces</em>
|
471
|
-
</p>
|
472
|
-
<pre>
|
473
|
-
a
|
474
|
-
b
|
475
|
-
c
|
476
|
-
</pre>
|
477
|
-
<p>
|
478
|
-
WARNING! Use with caution. Methods from other libraries may depend on the
|
479
|
-
old behavior, expecting a two element array to be passed into a single
|
480
|
-
block argument.
|
481
|
-
</p>
|
482
|
-
</div>
|
483
|
-
<div class="sourcecode">
|
484
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show source</a> ]</p>
|
485
|
-
<div id="M000053_source" class="dyn-source">
|
486
|
-
<pre>
|
487
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/each.rb, line 19</span>
|
488
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">yld</span>)
|
489
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">yld</span>.<span class="ruby-identifier">arity</span>
|
490
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span>
|
491
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span>
|
492
|
-
<span class="ruby-identifier">each_value</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">v</span>)}
|
493
|
-
<span class="ruby-keyword kw">else</span>
|
494
|
-
<span class="ruby-identifier">each_pair</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">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>)}
|
495
|
-
<span class="ruby-keyword kw">end</span>
|
496
|
-
<span class="ruby-keyword kw">self</span>
|
497
|
-
<span class="ruby-keyword kw">end</span>
|
498
|
-
</pre>
|
499
|
-
</div>
|
500
|
-
</div>
|
501
|
-
</div>
|
502
|
-
<div class="method">
|
503
|
-
<div class="title">
|
504
|
-
<a name="M000054"></a><b>each_with_index</b>( &yld )
|
505
|
-
</div>
|
506
|
-
<div class="description">
|
507
|
-
<p>
|
508
|
-
Alias for <a href="Hash.html#M000051">each_with_key</a>
|
509
|
-
</p>
|
510
|
-
</div>
|
511
|
-
</div>
|
512
|
-
<div class="method">
|
513
|
-
<div class="title">
|
514
|
-
<a name="M000051"></a><b>each_with_key</b>( &yld )
|
515
|
-
</div>
|
516
|
-
<div class="aka">
|
517
|
-
This method is also aliased as
|
518
|
-
<a href="Hash.html#M000054">each_with_index</a>
|
519
|
-
</div>
|
520
|
-
<div class="sourcecode">
|
521
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show source</a> ]</p>
|
522
|
-
<div id="M000051_source" class="dyn-source">
|
523
|
-
<pre>
|
524
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/each_with_key.rb, line 4</span>
|
525
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_with_key</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">yld</span> )
|
526
|
-
<span class="ruby-identifier">each_pair</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">yld</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">v</span>,<span class="ruby-identifier">k</span>) }
|
527
|
-
<span class="ruby-keyword kw">end</span>
|
528
|
-
</pre>
|
529
|
-
</div>
|
530
|
-
</div>
|
531
|
-
</div>
|
532
|
-
<div class="method">
|
533
|
-
<div class="title">
|
534
|
-
<a name="M000055"></a><b>graph!</b>( &blk )
|
535
|
-
</div>
|
536
|
-
<div class="description">
|
537
|
-
<p>
|
538
|
-
As with <a href="Enumerable.html#M000466">Enumerable#graph</a> but acts in
|
539
|
-
place.
|
540
|
-
</p>
|
541
|
-
</div>
|
542
|
-
<div class="sourcecode">
|
543
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show source</a> ]</p>
|
544
|
-
<div id="M000055_source" class="dyn-source">
|
545
|
-
<pre>
|
546
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/graph.rb, line 5</span>
|
547
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">graph!</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
548
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>( <span class="ruby-identifier">graph</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> ) )
|
549
|
-
<span class="ruby-keyword kw">end</span>
|
550
|
-
</pre>
|
551
|
-
</div>
|
552
|
-
</div>
|
553
|
-
</div>
|
554
|
-
<div class="method">
|
555
|
-
<div class="title">
|
556
|
-
<a name="M000088"></a><b>has_keys?</b>(*check_keys)
|
557
|
-
</div>
|
558
|
-
<div class="description">
|
559
|
-
<p>
|
560
|
-
Returns true or false whether the hash contains the given keys.
|
561
|
-
</p>
|
562
|
-
<pre>
|
563
|
-
h = { :a => 1, :b => 2 }
|
564
|
-
h.has_keys?( :a ) #=> true
|
565
|
-
h.has_keys?( :c ) #=> false
|
566
|
-
</pre>
|
567
|
-
</div>
|
568
|
-
<div class="sourcecode">
|
569
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">show source</a> ]</p>
|
570
|
-
<div id="M000088_source" class="dyn-source">
|
571
|
-
<pre>
|
572
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/has_keys.rb, line 10</span>
|
573
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
574
|
-
<span class="ruby-identifier">unknown_keys</span> = <span class="ruby-identifier">check_keys</span> <span class="ruby-operator">-</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span>
|
575
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">unknown_keys</span>.<span class="ruby-identifier">empty?</span>
|
576
|
-
<span class="ruby-keyword kw">end</span>
|
577
|
-
</pre>
|
578
|
-
</div>
|
579
|
-
</div>
|
580
|
-
</div>
|
581
|
-
<div class="method">
|
582
|
-
<div class="title">
|
583
|
-
<a name="M000070"></a><b>has_only_keys?</b>(*check_keys)
|
584
|
-
</div>
|
585
|
-
<div class="description">
|
586
|
-
<p>
|
587
|
-
Returns true if the hash contains <em>only</em> the given keys, otherwise
|
588
|
-
false.
|
589
|
-
</p>
|
590
|
-
<pre>
|
591
|
-
h = { :a => 1, :b => 2 }
|
592
|
-
h.has_only_keys?( :a, :b ) #=> true
|
593
|
-
h.has_only_keys?( :a ) #=> false
|
594
|
-
</pre>
|
595
|
-
</div>
|
596
|
-
<div class="sourcecode">
|
597
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
|
598
|
-
<div id="M000070_source" class="dyn-source">
|
599
|
-
<pre>
|
600
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/has_only_keys.rb, line 10</span>
|
601
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_only_keys?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">check_keys</span>)
|
602
|
-
<span class="ruby-identifier">unknown_keys</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">check_keys</span>
|
603
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">unknown_keys</span>.<span class="ruby-identifier">empty?</span>
|
604
|
-
<span class="ruby-keyword kw">end</span>
|
605
|
-
</pre>
|
606
|
-
</div>
|
607
|
-
</div>
|
608
|
-
</div>
|
609
|
-
<div class="method">
|
610
|
-
<div class="title">
|
611
|
-
<a name="M000058"></a><b>inverse</b>()
|
612
|
-
</div>
|
613
|
-
<div class="description">
|
614
|
-
<p>
|
615
|
-
Create a "true" inverse hash by storing mutliple values in
|
616
|
-
Arrays.
|
617
|
-
</p>
|
618
|
-
<pre>
|
619
|
-
h = {"a"=>3, "b"=>3, "c"=>3, "d"=>2, "e"=>9, "f"=>3, "g"=>9}
|
620
|
-
|
621
|
-
h.invert #=> {2=>"d", 3=>"f", 9=>"g"}
|
622
|
-
h.inverse #=> {2=>"d", 3=>["f", "c", "b", "a"], 9=>["g", "e"]}
|
623
|
-
h.inverse.inverse #=> {"a"=>3, "b"=>3, "c"=>3, "d"=>2, "e"=>9, "f"=>3, "g"=>9}
|
624
|
-
h.inverse.inverse == h #=> true
|
625
|
-
</pre>
|
626
|
-
</div>
|
627
|
-
<div class="sourcecode">
|
628
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show source</a> ]</p>
|
629
|
-
<div id="M000058_source" class="dyn-source">
|
630
|
-
<pre>
|
631
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/inverse.rb, line 16</span>
|
632
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inverse</span>
|
633
|
-
<span class="ruby-identifier">i</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
634
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_pair</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
635
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-constant">Array</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">v</span>)
|
636
|
-
<span class="ruby-identifier">v</span>.<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">i</span>[<span class="ruby-identifier">x</span>] = ( <span class="ruby-identifier">i</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">x</span>) <span class="ruby-operator">?</span> [<span class="ruby-identifier">k</span>,<span class="ruby-identifier">i</span>[<span class="ruby-identifier">x</span>]].<span class="ruby-identifier">flatten</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">k</span> ) }
|
637
|
-
<span class="ruby-keyword kw">else</span>
|
638
|
-
<span class="ruby-identifier">i</span>[<span class="ruby-identifier">v</span>] = ( <span class="ruby-identifier">i</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">v</span>) <span class="ruby-operator">?</span> [<span class="ruby-identifier">k</span>,<span class="ruby-identifier">i</span>[<span class="ruby-identifier">v</span>]].<span class="ruby-identifier">flatten</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">k</span> )
|
639
|
-
<span class="ruby-keyword kw">end</span>
|
640
|
-
}
|
641
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">i</span>
|
642
|
-
<span class="ruby-keyword kw">end</span>
|
643
|
-
</pre>
|
644
|
-
</div>
|
645
|
-
</div>
|
646
|
-
</div>
|
647
|
-
<div class="method">
|
648
|
-
<div class="title">
|
649
|
-
<a name="M000052"></a><b>join</b>( pair_divider='', elem_divider='' )
|
650
|
-
</div>
|
651
|
-
<div class="sourcecode">
|
652
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show source</a> ]</p>
|
653
|
-
<div id="M000052_source" class="dyn-source">
|
654
|
-
<pre>
|
655
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/join.rb, line 4</span>
|
656
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>( <span class="ruby-identifier">pair_divider</span>=<span class="ruby-value str">''</span>, <span class="ruby-identifier">elem_divider</span>=<span class="ruby-value str">''</span> )
|
657
|
-
<span class="ruby-identifier">s</span> = []
|
658
|
-
<span class="ruby-identifier">each_pair</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">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{k}#{pair_divider}#{v}"</span> }
|
659
|
-
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">elem_divider</span>)
|
660
|
-
<span class="ruby-keyword kw">end</span>
|
661
|
-
</pre>
|
662
|
-
</div>
|
663
|
-
</div>
|
664
|
-
</div>
|
665
|
-
<div class="method">
|
666
|
-
<div class="title">
|
667
|
-
<a name="M000077"></a><b>keys_to_iv</b>( of_class=nil )
|
668
|
-
</div>
|
669
|
-
<div class="description">
|
670
|
-
<p>
|
671
|
-
Converts all keys in the <a href="Hash.html">Hash</a> to be <a
|
672
|
-
href="String.html">String</a> values, returning a new <a
|
673
|
-
href="Hash.html">Hash</a>. With a from_class parameter, limits conversion
|
674
|
-
to only a certain class of keys. It defaults to nil which convert any key
|
675
|
-
class.
|
676
|
-
</p>
|
677
|
-
<pre>
|
678
|
-
foo = { :name=>'Gavin', :wife=>:Lisa }
|
679
|
-
foo.keys_to_iv #=> { "@name"=>"Gavin", "@wife"=>:Lisa }
|
680
|
-
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
681
|
-
</pre>
|
682
|
-
</div>
|
683
|
-
<div class="aka">
|
684
|
-
This method is also aliased as
|
685
|
-
<a href="Hash.html#M000078">variablize_keys</a>
|
686
|
-
</div>
|
687
|
-
<div class="sourcecode">
|
688
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show source</a> ]</p>
|
689
|
-
<div id="M000077_source" class="dyn-source">
|
690
|
-
<pre>
|
691
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_iv.rb, line 11</span>
|
692
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_iv</span>( <span class="ruby-identifier">of_class</span>=<span class="ruby-keyword kw">nil</span> )
|
693
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">keys_to_instance_vars!</span>( <span class="ruby-identifier">of_class</span> )
|
694
|
-
<span class="ruby-keyword kw">end</span>
|
695
|
-
</pre>
|
696
|
-
</div>
|
697
|
-
</div>
|
698
|
-
</div>
|
699
|
-
<div class="method">
|
700
|
-
<div class="title">
|
701
|
-
<a name="M000079"></a><b>keys_to_iv!</b>( of_class=nil )
|
702
|
-
</div>
|
703
|
-
<div class="description">
|
704
|
-
<p>
|
705
|
-
Synonym for Hash#keys_to_string, but modifies the receiver in place (and
|
706
|
-
returns it). With a from_class parameter, limits conversion to only a
|
707
|
-
certain class of keys. It defaults to nil which convert any key class.
|
708
|
-
</p>
|
709
|
-
<pre>
|
710
|
-
foo = { :name=>'Gavin', :wife=>:Lisa }
|
711
|
-
foo.keys_to_iv! #=> { "@name"=>"Gavin", "@wife"=>:Lisa }
|
712
|
-
foo.inspect #=> { "@name"=>"Gavin", "@wife"=>:Lisa }
|
713
|
-
</pre>
|
714
|
-
</div>
|
715
|
-
<div class="aka">
|
716
|
-
This method is also aliased as
|
717
|
-
<a href="Hash.html#M000080">variablize_keys!</a>
|
718
|
-
</div>
|
719
|
-
<div class="sourcecode">
|
720
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">show source</a> ]</p>
|
721
|
-
<div id="M000079_source" class="dyn-source">
|
722
|
-
<pre>
|
723
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_iv.rb, line 26</span>
|
724
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_iv!</span>( <span class="ruby-identifier">of_class</span>=<span class="ruby-keyword kw">nil</span> )
|
725
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Parameter must be a class"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">of_class</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">of_class</span>
|
726
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">of_class</span>
|
727
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
728
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_s</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">of_class</span>
|
729
|
-
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>
|
730
|
-
<span class="ruby-identifier">nk</span> = <span class="ruby-identifier">k</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'@'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">:</span> <span class="ruby-node">"@#{k}"</span>
|
731
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">nk</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
732
|
-
<span class="ruby-keyword kw">end</span>
|
733
|
-
<span class="ruby-keyword kw">end</span>
|
734
|
-
<span class="ruby-keyword kw">else</span>
|
735
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
736
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_s</span>)
|
737
|
-
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>
|
738
|
-
<span class="ruby-identifier">nk</span> = <span class="ruby-identifier">k</span>[<span class="ruby-value">0</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">!=</span> <span class="ruby-value str">'@'</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">k</span> <span class="ruby-operator">:</span> <span class="ruby-node">"@#{k}"</span>
|
739
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">nk</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>)
|
740
|
-
<span class="ruby-keyword kw">end</span>
|
741
|
-
<span class="ruby-keyword kw">end</span>
|
742
|
-
<span class="ruby-keyword kw">end</span>
|
743
|
-
<span class="ruby-keyword kw">self</span>
|
744
|
-
<span class="ruby-keyword kw">end</span>
|
745
|
-
</pre>
|
746
|
-
</div>
|
747
|
-
</div>
|
748
|
-
</div>
|
749
|
-
<div class="method">
|
750
|
-
<div class="title">
|
751
|
-
<a name="M000091"></a><b>keys_to_s</b>( from_class=nil )
|
752
|
-
</div>
|
753
|
-
<div class="description">
|
754
|
-
<p>
|
755
|
-
Converts all keys in the <a href="Hash.html">Hash</a> to be <a
|
756
|
-
href="String.html">String</a> values, returning a new <a
|
757
|
-
href="Hash.html">Hash</a>. With a from_class parameter, limits conversion
|
758
|
-
to only a certain class of keys. It defaults to nil which convert any key
|
759
|
-
class.
|
760
|
-
</p>
|
761
|
-
<pre>
|
762
|
-
foo = { :name=>'Gavin', :wife=>:Lisa }
|
763
|
-
foo.keys_to_s #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
764
|
-
foo.inspect #=> { :name =>"Gavin", :wife=>:Lisa }
|
765
|
-
</pre>
|
766
|
-
</div>
|
767
|
-
<div class="aka">
|
768
|
-
This method is also aliased as
|
769
|
-
<a href="Hash.html#M000092">stringify_keys</a>
|
770
|
-
</div>
|
771
|
-
<div class="sourcecode">
|
772
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000091_source')" id="l_M000091_source">show source</a> ]</p>
|
773
|
-
<div id="M000091_source" class="dyn-source">
|
774
|
-
<pre>
|
775
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_s.rb, line 15</span>
|
776
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_s</span>( <span class="ruby-identifier">from_class</span>=<span class="ruby-keyword kw">nil</span> )
|
777
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Parameter must be a class"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">from_class</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
778
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">keys_to_s!</span>( <span class="ruby-identifier">from_class</span> )
|
779
|
-
<span class="ruby-keyword kw">end</span>
|
780
|
-
</pre>
|
781
|
-
</div>
|
782
|
-
</div>
|
783
|
-
</div>
|
784
|
-
<div class="method">
|
785
|
-
<div class="title">
|
786
|
-
<a name="M000093"></a><b>keys_to_s!</b>( from_class=nil )
|
787
|
-
</div>
|
788
|
-
<div class="description">
|
789
|
-
<p>
|
790
|
-
Synonym for Hash#keys_to_string, but modifies the receiver in place (and
|
791
|
-
returns it). With a from_class parameter, limits conversion to only a
|
792
|
-
certain class of keys. It defaults to nil which convert any key class.
|
793
|
-
</p>
|
794
|
-
<pre>
|
795
|
-
foo = { :name=>'Gavin', :wife=>:Lisa }
|
796
|
-
foo.keys_to_s! #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
797
|
-
foo.inspect #=> { "name"=>"Gavin", "wife"=>:Lisa }
|
798
|
-
</pre>
|
799
|
-
</div>
|
800
|
-
<div class="aka">
|
801
|
-
This method is also aliased as
|
802
|
-
<a href="Hash.html#M000094">stringify_keys!</a>
|
803
|
-
</div>
|
804
|
-
<div class="sourcecode">
|
805
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000093_source')" id="l_M000093_source">show source</a> ]</p>
|
806
|
-
<div id="M000093_source" class="dyn-source">
|
807
|
-
<pre>
|
808
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_s.rb, line 34</span>
|
809
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_s!</span>( <span class="ruby-identifier">from_class</span>=<span class="ruby-keyword kw">nil</span> )
|
810
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Parameter must be a class"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">from_class</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
811
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
812
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
813
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_s</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">from_class</span>
|
814
|
-
}
|
815
|
-
<span class="ruby-keyword kw">else</span>
|
816
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
817
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_s</span>)
|
818
|
-
}
|
819
|
-
<span class="ruby-keyword kw">end</span>
|
820
|
-
<span class="ruby-keyword kw">self</span>
|
821
|
-
<span class="ruby-keyword kw">end</span>
|
822
|
-
</pre>
|
823
|
-
</div>
|
824
|
-
</div>
|
825
|
-
</div>
|
826
|
-
<div class="method">
|
827
|
-
<div class="title">
|
828
|
-
<a name="M000065"></a><b>keys_to_sym</b>( from_class=String )
|
829
|
-
</div>
|
830
|
-
<div class="description">
|
831
|
-
<p>
|
832
|
-
Converts all keys in the <a href="Hash.html">Hash</a> to be <a
|
833
|
-
href="Symbol.html">Symbol</a> values, returning a new <a
|
834
|
-
href="Hash.html">Hash</a>. With a from_class parameter, limits conversion
|
835
|
-
to only a certain class of keys. It defaults to <a
|
836
|
-
href="String.html">String</a> —use nil to convert any key class.
|
837
|
-
</p>
|
838
|
-
<pre>
|
839
|
-
foo = { :name=>'Gavin', 'wife'=>:Lisa }
|
840
|
-
foo.keys_to_sym #=> { :name=>"Gavin", :wife=>:Lisa }
|
841
|
-
foo.inspect #=> { "name" =>"Gavin", "wife"=>:Lisa }
|
842
|
-
</pre>
|
843
|
-
</div>
|
844
|
-
<div class="aka">
|
845
|
-
This method is also aliased as
|
846
|
-
<a href="Hash.html#M000066">symbolize_keys</a>
|
847
|
-
</div>
|
848
|
-
<div class="sourcecode">
|
849
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p>
|
850
|
-
<div id="M000065_source" class="dyn-source">
|
851
|
-
<pre>
|
852
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_sym.rb, line 15</span>
|
853
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_sym</span>( <span class="ruby-identifier">from_class</span>=<span class="ruby-constant">String</span> )
|
854
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Parameter must be a class"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">from_class</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
855
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">keys_to_sym!</span>( <span class="ruby-identifier">from_class</span> )
|
856
|
-
<span class="ruby-keyword kw">end</span>
|
857
|
-
</pre>
|
858
|
-
</div>
|
859
|
-
</div>
|
860
|
-
</div>
|
861
|
-
<div class="method">
|
862
|
-
<div class="title">
|
863
|
-
<a name="M000067"></a><b>keys_to_sym!</b>( from_class=String )
|
864
|
-
</div>
|
865
|
-
<div class="description">
|
866
|
-
<p>
|
867
|
-
Synonym for Hash#keys_to_symbol, but modifies the receiver in place (and
|
868
|
-
returns it). With a from_class parameter, limits conversion to only a
|
869
|
-
certain class of keys. It defaults to <a href="String.html">String</a>
|
870
|
-
—use nil to convert any key class.
|
871
|
-
</p>
|
872
|
-
<pre>
|
873
|
-
foo = { 'name'=>'Gavin', 'wife'=>:Lisa }
|
874
|
-
foo.keys_to_sym! #=> { :name=>"Gavin", :wife=>:Lisa }
|
875
|
-
foo.inspect #=> { :name=>"Gavin", :wife=>:Lisa }
|
876
|
-
</pre>
|
877
|
-
</div>
|
878
|
-
<div class="aka">
|
879
|
-
This method is also aliased as
|
880
|
-
<a href="Hash.html#M000068">symbolize_keys!</a>
|
881
|
-
</div>
|
882
|
-
<div class="sourcecode">
|
883
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
|
884
|
-
<div id="M000067_source" class="dyn-source">
|
885
|
-
<pre>
|
886
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/keys_to_sym.rb, line 40</span>
|
887
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">keys_to_sym!</span>( <span class="ruby-identifier">from_class</span>=<span class="ruby-constant">String</span> )
|
888
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Parameter must be a class"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">from_class</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
889
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">from_class</span>
|
890
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
891
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_sym</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">from_class</span>
|
892
|
-
}
|
893
|
-
<span class="ruby-keyword kw">else</span>
|
894
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_key</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
|
895
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>]=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:to_sym</span>)
|
896
|
-
}
|
897
|
-
<span class="ruby-keyword kw">end</span>
|
898
|
-
<span class="ruby-keyword kw">self</span>
|
899
|
-
<span class="ruby-keyword kw">end</span>
|
900
|
-
</pre>
|
901
|
-
</div>
|
902
|
-
</div>
|
903
|
-
</div>
|
904
|
-
<div class="method">
|
905
|
-
<div class="title">
|
906
|
-
<a name="M000061"></a><b>pick</b>()
|
907
|
-
</div>
|
908
|
-
<div class="description">
|
909
|
-
<p>
|
910
|
-
Alias for <a href="Hash.html#M000060">rand_value!</a>
|
911
|
-
</p>
|
912
|
-
</div>
|
913
|
-
</div>
|
914
|
-
<div class="method">
|
915
|
-
<div class="title">
|
916
|
-
<a name="M000075"></a><b>pick_key</b>()
|
917
|
-
</div>
|
918
|
-
<div class="description">
|
919
|
-
<p>
|
920
|
-
Alias for <a href="Hash.html#M000074">rand_key!</a>
|
921
|
-
</p>
|
922
|
-
</div>
|
923
|
-
</div>
|
924
|
-
<div class="method">
|
925
|
-
<div class="title">
|
926
|
-
<a name="M000099"></a><b>pick_pair</b>()
|
927
|
-
</div>
|
928
|
-
<div class="description">
|
929
|
-
<p>
|
930
|
-
Alias for <a href="Hash.html#M000098">rand_pair!</a>
|
931
|
-
</p>
|
932
|
-
</div>
|
933
|
-
</div>
|
934
|
-
<div class="method">
|
935
|
-
<div class="title">
|
936
|
-
<a name="M000073"></a><b>rand_key</b>()
|
937
|
-
</div>
|
938
|
-
<div class="description">
|
939
|
-
<p>
|
940
|
-
Returns a random key.
|
941
|
-
</p>
|
942
|
-
<pre>
|
943
|
-
{:one => 1, :two => 2, :three => 3}.pick_key #=> :three
|
944
|
-
</pre>
|
945
|
-
</div>
|
946
|
-
<div class="sourcecode">
|
947
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p>
|
948
|
-
<div id="M000073_source" class="dyn-source">
|
949
|
-
<pre>
|
950
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_key.rb, line 7</span>
|
951
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_key</span>
|
952
|
-
<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">at</span>( <span class="ruby-identifier">rand</span>(<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">size</span>) )
|
953
|
-
<span class="ruby-keyword kw">end</span>
|
954
|
-
</pre>
|
955
|
-
</div>
|
956
|
-
</div>
|
957
|
-
</div>
|
958
|
-
<div class="method">
|
959
|
-
<div class="title">
|
960
|
-
<a name="M000074"></a><b>rand_key!</b>()
|
961
|
-
</div>
|
962
|
-
<div class="description">
|
963
|
-
<p>
|
964
|
-
Delete a random key-value pair, returning the key.
|
965
|
-
</p>
|
966
|
-
<pre>
|
967
|
-
a = {:one => 1, :two => 2, :three => 3}
|
968
|
-
a.pick_key! #=> :two
|
969
|
-
a #=> {:one => 1, :three => 3}
|
970
|
-
</pre>
|
971
|
-
</div>
|
972
|
-
<div class="aka">
|
973
|
-
This method is also aliased as
|
974
|
-
<a href="Hash.html#M000075">pick_key</a>
|
975
|
-
</div>
|
976
|
-
<div class="sourcecode">
|
977
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p>
|
978
|
-
<div id="M000074_source" class="dyn-source">
|
979
|
-
<pre>
|
980
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_key.rb, line 17</span>
|
981
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_key!</span>
|
982
|
-
<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span> = <span class="ruby-identifier">rand_pair</span>
|
983
|
-
<span class="ruby-identifier">delete</span>( <span class="ruby-identifier">k</span> )
|
984
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">k</span>
|
985
|
-
<span class="ruby-keyword kw">end</span>
|
986
|
-
</pre>
|
987
|
-
</div>
|
988
|
-
</div>
|
989
|
-
</div>
|
990
|
-
<div class="method">
|
991
|
-
<div class="title">
|
992
|
-
<a name="M000097"></a><b>rand_pair</b>()
|
993
|
-
</div>
|
994
|
-
<div class="description">
|
995
|
-
<p>
|
996
|
-
Returns a random key-value pair.
|
997
|
-
</p>
|
998
|
-
<pre>
|
999
|
-
{:one => 1, :two => 2, :three => 3}.pick #=> [:one, 1]
|
1000
|
-
</pre>
|
1001
|
-
</div>
|
1002
|
-
<div class="sourcecode">
|
1003
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000097_source')" id="l_M000097_source">show source</a> ]</p>
|
1004
|
-
<div id="M000097_source" class="dyn-source">
|
1005
|
-
<pre>
|
1006
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_pair.rb, line 9</span>
|
1007
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_pair</span>
|
1008
|
-
<span class="ruby-identifier">k</span> = <span class="ruby-identifier">rand_key</span>
|
1009
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">k</span>, <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">k</span>)
|
1010
|
-
<span class="ruby-keyword kw">end</span>
|
1011
|
-
</pre>
|
1012
|
-
</div>
|
1013
|
-
</div>
|
1014
|
-
</div>
|
1015
|
-
<div class="method">
|
1016
|
-
<div class="title">
|
1017
|
-
<a name="M000098"></a><b>rand_pair!</b>()
|
1018
|
-
</div>
|
1019
|
-
<div class="description">
|
1020
|
-
<p>
|
1021
|
-
Deletes a random key-value pair and returns that pair.
|
1022
|
-
</p>
|
1023
|
-
<pre>
|
1024
|
-
a = {:one => 1, :two => 2, :three => 3}
|
1025
|
-
a.rand_pair! #=> [:two, 2]
|
1026
|
-
a #=> {:one => 1, :three => 3}
|
1027
|
-
</pre>
|
1028
|
-
</div>
|
1029
|
-
<div class="aka">
|
1030
|
-
This method is also aliased as
|
1031
|
-
<a href="Hash.html#M000099">pick_pair</a>
|
1032
|
-
</div>
|
1033
|
-
<div class="sourcecode">
|
1034
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000098_source')" id="l_M000098_source">show source</a> ]</p>
|
1035
|
-
<div id="M000098_source" class="dyn-source">
|
1036
|
-
<pre>
|
1037
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_pair.rb, line 20</span>
|
1038
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_pair!</span>
|
1039
|
-
<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span> = <span class="ruby-identifier">rand_pair</span>
|
1040
|
-
<span class="ruby-identifier">delete</span>( <span class="ruby-identifier">k</span> )
|
1041
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>
|
1042
|
-
<span class="ruby-keyword kw">end</span>
|
1043
|
-
</pre>
|
1044
|
-
</div>
|
1045
|
-
</div>
|
1046
|
-
</div>
|
1047
|
-
<div class="method">
|
1048
|
-
<div class="title">
|
1049
|
-
<a name="M000059"></a><b>rand_value</b>()
|
1050
|
-
</div>
|
1051
|
-
<div class="description">
|
1052
|
-
<p>
|
1053
|
-
Returns a random hash value.
|
1054
|
-
</p>
|
1055
|
-
<pre>
|
1056
|
-
{:one => 1, :two => 2, :three => 3}.rand_value #=> 2
|
1057
|
-
{:one => 1, :two => 2, :three => 3}.rand_value #=> 1
|
1058
|
-
</pre>
|
1059
|
-
</div>
|
1060
|
-
<div class="aka">
|
1061
|
-
This method is also aliased as
|
1062
|
-
<a href="Hash.html#M000062">at_rand</a>
|
1063
|
-
</div>
|
1064
|
-
<div class="sourcecode">
|
1065
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show source</a> ]</p>
|
1066
|
-
<div id="M000059_source" class="dyn-source">
|
1067
|
-
<pre>
|
1068
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_value.rb, line 16</span>
|
1069
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_value</span>
|
1070
|
-
<span class="ruby-identifier">fetch</span>( <span class="ruby-identifier">rand_key</span> )
|
1071
|
-
<span class="ruby-keyword kw">end</span>
|
1072
|
-
</pre>
|
1073
|
-
</div>
|
1074
|
-
</div>
|
1075
|
-
</div>
|
1076
|
-
<div class="method">
|
1077
|
-
<div class="title">
|
1078
|
-
<a name="M000060"></a><b>rand_value!</b>()
|
1079
|
-
</div>
|
1080
|
-
<div class="description">
|
1081
|
-
<p>
|
1082
|
-
Deletes a random key-value pair and returns the value.
|
1083
|
-
</p>
|
1084
|
-
<pre>
|
1085
|
-
a = {:one => 1, :two => 2, :three => 3}
|
1086
|
-
a.at_rand! #=> 2
|
1087
|
-
a #=> {:one => 1, :three => 3}
|
1088
|
-
</pre>
|
1089
|
-
</div>
|
1090
|
-
<div class="aka">
|
1091
|
-
This method is also aliased as
|
1092
|
-
<a href="Hash.html#M000061">pick</a>
|
1093
|
-
<a href="Hash.html#M000063">at_rand!</a>
|
1094
|
-
</div>
|
1095
|
-
<div class="sourcecode">
|
1096
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show source</a> ]</p>
|
1097
|
-
<div id="M000060_source" class="dyn-source">
|
1098
|
-
<pre>
|
1099
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/rand_value.rb, line 26</span>
|
1100
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rand_value!</span>
|
1101
|
-
<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span> = <span class="ruby-identifier">rand_pair</span>
|
1102
|
-
<span class="ruby-identifier">delete</span>( <span class="ruby-identifier">k</span> )
|
1103
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">v</span>
|
1104
|
-
<span class="ruby-keyword kw">end</span>
|
1105
|
-
</pre>
|
1106
|
-
</div>
|
1107
|
-
</div>
|
1108
|
-
</div>
|
1109
|
-
<div class="method">
|
1110
|
-
<div class="title">
|
1111
|
-
<a name="M000071"></a><b>replace_each</b>( {|| ...}
|
1112
|
-
</div>
|
1113
|
-
<div class="description">
|
1114
|
-
<p>
|
1115
|
-
Same as <a href="Hash.html#M000100">update_each</a>, but deletes the key
|
1116
|
-
element first.
|
1117
|
-
</p>
|
1118
|
-
</div>
|
1119
|
-
<div class="sourcecode">
|
1120
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
|
1121
|
-
<div id="M000071_source" class="dyn-source">
|
1122
|
-
<pre>
|
1123
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/replace_each.rb, line 4</span>
|
1124
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
1125
|
-
<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">each_pair</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">delete</span>( <span class="ruby-identifier">k</span> ); <span class="ruby-identifier">update</span>( <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) ); }
|
1126
|
-
<span class="ruby-keyword kw">self</span>
|
1127
|
-
<span class="ruby-keyword kw">end</span>
|
1128
|
-
</pre>
|
1129
|
-
</div>
|
1130
|
-
</div>
|
1131
|
-
</div>
|
1132
|
-
<div class="method">
|
1133
|
-
<div class="title">
|
1134
|
-
<a name="M000083"></a><b>shuffle</b>()
|
1135
|
-
</div>
|
1136
|
-
<div class="description">
|
1137
|
-
<p>
|
1138
|
-
Returns a copy of the hash with <em>values</em> arranged in new random
|
1139
|
-
order.
|
1140
|
-
</p>
|
1141
|
-
<pre>
|
1142
|
-
h = {:a=>1, :b=>2, :c=>3}
|
1143
|
-
h.shuffle_hash #=> {:b=>2, :c=>1, :a>3}
|
1144
|
-
</pre>
|
1145
|
-
</div>
|
1146
|
-
<div class="sourcecode">
|
1147
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000083_source')" id="l_M000083_source">show source</a> ]</p>
|
1148
|
-
<div id="M000083_source" class="dyn-source">
|
1149
|
-
<pre>
|
1150
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/shuffle.rb, line 11</span>
|
1151
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shuffle</span>
|
1152
|
-
<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">zipnew</span>( <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">rand</span>}, <span class="ruby-identifier">values</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-constant">Kernel</span>.<span class="ruby-identifier">rand</span>} )
|
1153
|
-
<span class="ruby-keyword kw">end</span>
|
1154
|
-
</pre>
|
1155
|
-
</div>
|
1156
|
-
</div>
|
1157
|
-
</div>
|
1158
|
-
<div class="method">
|
1159
|
-
<div class="title">
|
1160
|
-
<a name="M000084"></a><b>shuffle!</b>()
|
1161
|
-
</div>
|
1162
|
-
<div class="description">
|
1163
|
-
<p>
|
1164
|
-
Destructive shuffle_hash. Arrange the values in a new random order.
|
1165
|
-
</p>
|
1166
|
-
<pre>
|
1167
|
-
h = {:a => 1, :b => 2, :c => 3}
|
1168
|
-
h.shuffle_hash!
|
1169
|
-
h #=> {:b=>2, :c=>1, :a=>3}
|
1170
|
-
</pre>
|
1171
|
-
</div>
|
1172
|
-
<div class="sourcecode">
|
1173
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000084_source')" id="l_M000084_source">show source</a> ]</p>
|
1174
|
-
<div id="M000084_source" class="dyn-source">
|
1175
|
-
<pre>
|
1176
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/shuffle.rb, line 22</span>
|
1177
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shuffle!</span>
|
1178
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>( <span class="ruby-identifier">shuffle</span> )
|
1179
|
-
<span class="ruby-keyword kw">end</span>
|
1180
|
-
</pre>
|
1181
|
-
</div>
|
1182
|
-
</div>
|
1183
|
-
</div>
|
1184
|
-
<div class="method">
|
1185
|
-
<div class="title">
|
1186
|
-
<a name="M000092"></a><b>stringify_keys</b>( from_class=nil )
|
1187
|
-
</div>
|
1188
|
-
<div class="description">
|
1189
|
-
<p>
|
1190
|
-
Alias for <a href="Hash.html#M000091">keys_to_s</a>
|
1191
|
-
</p>
|
1192
|
-
</div>
|
1193
|
-
</div>
|
1194
|
-
<div class="method">
|
1195
|
-
<div class="title">
|
1196
|
-
<a name="M000094"></a><b>stringify_keys!</b>( from_class=nil )
|
1197
|
-
</div>
|
1198
|
-
<div class="description">
|
1199
|
-
<p>
|
1200
|
-
Alias for <a href="Hash.html#M000093">keys_to_s!</a>
|
1201
|
-
</p>
|
1202
|
-
</div>
|
1203
|
-
</div>
|
1204
|
-
<div class="method">
|
1205
|
-
<div class="title">
|
1206
|
-
<a name="M000072"></a><b>swap!</b>( key1, key2 )
|
1207
|
-
</div>
|
1208
|
-
<div class="description">
|
1209
|
-
<p>
|
1210
|
-
Swap the values of a pair of keys in place.
|
1211
|
-
</p>
|
1212
|
-
<pre>
|
1213
|
-
{:a=>1,:b=>2}.swap! #=> {:a=>2,:b=>1}
|
1214
|
-
</pre>
|
1215
|
-
</div>
|
1216
|
-
<div class="sourcecode">
|
1217
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
|
1218
|
-
<div id="M000072_source" class="dyn-source">
|
1219
|
-
<pre>
|
1220
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/swap.rb, line 7</span>
|
1221
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">swap!</span>( <span class="ruby-identifier">key1</span>, <span class="ruby-identifier">key2</span> )
|
1222
|
-
<span class="ruby-identifier">tmp</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key1</span>]
|
1223
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key1</span>] = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key2</span>]
|
1224
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">key2</span>] = <span class="ruby-identifier">tmp</span>
|
1225
|
-
<span class="ruby-keyword kw">self</span>
|
1226
|
-
<span class="ruby-keyword kw">end</span>
|
1227
|
-
</pre>
|
1228
|
-
</div>
|
1229
|
-
</div>
|
1230
|
-
</div>
|
1231
|
-
<div class="method">
|
1232
|
-
<div class="title">
|
1233
|
-
<a name="M000090"></a><b>swapkey!</b>( newkey, oldkey )
|
1234
|
-
</div>
|
1235
|
-
<div class="description">
|
1236
|
-
<p>
|
1237
|
-
Modifies the receiving <a href="Hash.html">Hash</a> so that the value
|
1238
|
-
previously referred to by <em>oldkey</em> is referenced by <em>newkey</em>;
|
1239
|
-
<em>oldkey</em> is removed from the <a href="Hash.html">Hash</a>. If
|
1240
|
-
<em>oldkey</em> does not exist as a key in the <a
|
1241
|
-
href="Hash.html">Hash</a>, no change is effected.
|
1242
|
-
</p>
|
1243
|
-
<p>
|
1244
|
-
Returns a reference to the <a href="Hash.html">Hash</a>.
|
1245
|
-
</p>
|
1246
|
-
<pre>
|
1247
|
-
foo = { :a=>1, :b=>2 }
|
1248
|
-
foo.swapkey!('a',:a) #=> { 'a'=>1, :b=>2 }
|
1249
|
-
foo.swapkey!('b',:b) #=> { 'a'=>1, 'b'=>2 }
|
1250
|
-
foo.swapkey!('foo','bar') #=> { 'a'=>1, 'b'=>2 }
|
1251
|
-
</pre>
|
1252
|
-
</div>
|
1253
|
-
<div class="sourcecode">
|
1254
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000090_source')" id="l_M000090_source">show source</a> ]</p>
|
1255
|
-
<div id="M000090_source" class="dyn-source">
|
1256
|
-
<pre>
|
1257
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/swapkey.rb, line 16</span>
|
1258
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">swapkey!</span>( <span class="ruby-identifier">newkey</span>, <span class="ruby-identifier">oldkey</span> )
|
1259
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">newkey</span>] = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">oldkey</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">oldkey</span>)
|
1260
|
-
<span class="ruby-keyword kw">self</span>
|
1261
|
-
<span class="ruby-keyword kw">end</span>
|
1262
|
-
</pre>
|
1263
|
-
</div>
|
1264
|
-
</div>
|
1265
|
-
</div>
|
1266
|
-
<div class="method">
|
1267
|
-
<div class="title">
|
1268
|
-
<a name="M000066"></a><b>symbolize_keys</b>( from_class=String )
|
1269
|
-
</div>
|
1270
|
-
<div class="description">
|
1271
|
-
<p>
|
1272
|
-
Alias for <a href="Hash.html#M000065">keys_to_sym</a>
|
1273
|
-
</p>
|
1274
|
-
</div>
|
1275
|
-
</div>
|
1276
|
-
<div class="method">
|
1277
|
-
<div class="title">
|
1278
|
-
<a name="M000068"></a><b>symbolize_keys!</b>( from_class=String )
|
1279
|
-
</div>
|
1280
|
-
<div class="description">
|
1281
|
-
<p>
|
1282
|
-
Alias for <a href="Hash.html#M000067">keys_to_sym!</a>
|
1283
|
-
</p>
|
1284
|
-
</div>
|
1285
|
-
</div>
|
1286
|
-
<div class="method">
|
1287
|
-
<div class="title">
|
1288
|
-
<a name="M000076"></a><b>to_h</b>()
|
1289
|
-
</div>
|
1290
|
-
<div class="description">
|
1291
|
-
<p>
|
1292
|
-
Return a rehashing of <em>self</em>.
|
1293
|
-
</p>
|
1294
|
-
<pre>
|
1295
|
-
{"a"=>1,"b"=>2}.to_h #=> {"b"=>2,"a"=>1}
|
1296
|
-
</pre>
|
1297
|
-
</div>
|
1298
|
-
<div class="sourcecode">
|
1299
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show source</a> ]</p>
|
1300
|
-
<div id="M000076_source" class="dyn-source">
|
1301
|
-
<pre>
|
1302
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/to_h.rb, line 10</span>
|
1303
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>; <span class="ruby-identifier">rehash</span>; <span class="ruby-keyword kw">end</span>
|
1304
|
-
</pre>
|
1305
|
-
</div>
|
1306
|
-
</div>
|
1307
|
-
</div>
|
1308
|
-
<div class="method">
|
1309
|
-
<div class="title">
|
1310
|
-
<a name="M000056"></a><b>to_ostruct</b>()
|
1311
|
-
</div>
|
1312
|
-
<div class="description">
|
1313
|
-
<p>
|
1314
|
-
Turns a hash into a generic object using an <a
|
1315
|
-
href="OpenStruct.html">OpenStruct</a>.
|
1316
|
-
</p>
|
1317
|
-
<pre>
|
1318
|
-
o = { 'a' => 1 }.to_ostruct
|
1319
|
-
o.a #=> 1
|
1320
|
-
</pre>
|
1321
|
-
</div>
|
1322
|
-
<div class="sourcecode">
|
1323
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
|
1324
|
-
<div id="M000056_source" class="dyn-source">
|
1325
|
-
<pre>
|
1326
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/to_ostruct.rb, line 10</span>
|
1327
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ostruct</span>
|
1328
|
-
<span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>( <span class="ruby-keyword kw">self</span> )
|
1329
|
-
<span class="ruby-keyword kw">end</span>
|
1330
|
-
</pre>
|
1331
|
-
</div>
|
1332
|
-
</div>
|
1333
|
-
</div>
|
1334
|
-
<div class="method">
|
1335
|
-
<div class="title">
|
1336
|
-
<a name="M000089"></a><b>to_ostruct_recurse</b>( exclude={} )
|
1337
|
-
</div>
|
1338
|
-
<div class="description">
|
1339
|
-
<p>
|
1340
|
-
Like <a href="Hash.html#M000056">to_ostruct</a> but recusively objectifies
|
1341
|
-
all hash elements as well.
|
1342
|
-
</p>
|
1343
|
-
<pre>
|
1344
|
-
o = { 'a' => { 'b' => 1 } }.to_ostruct_recurse
|
1345
|
-
o.a.b #=> 1
|
1346
|
-
</pre>
|
1347
|
-
<p>
|
1348
|
-
The <tt>exclude</tt> parameter is used internally to prevent infinite
|
1349
|
-
recursion and is not intended to be utilized by the end-user. But for more
|
1350
|
-
advance use, if there is a particular subhash you would like to prevent
|
1351
|
-
from being converted to an OpoenStruct then include it in the
|
1352
|
-
<tt>exclude</tt> hash referencing itself. Eg.
|
1353
|
-
</p>
|
1354
|
-
<pre>
|
1355
|
-
h = { 'a' => { 'b' => 1 } }
|
1356
|
-
o = h.to_ostruct_recurse( { h['a'] => h['a'] } )
|
1357
|
-
o.a['b'] #=> 1
|
1358
|
-
</pre>
|
1359
|
-
</div>
|
1360
|
-
<div class="sourcecode">
|
1361
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000089_source')" id="l_M000089_source">show source</a> ]</p>
|
1362
|
-
<div id="M000089_source" class="dyn-source">
|
1363
|
-
<pre>
|
1364
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/to_ostruct_recurse.rb, line 22</span>
|
1365
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ostruct_recurse</span>( <span class="ruby-identifier">exclude</span>={} )
|
1366
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">exclude</span>[<span class="ruby-keyword kw">self</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exclude</span>.<span class="ruby-identifier">key?</span>( <span class="ruby-keyword kw">self</span> )
|
1367
|
-
<span class="ruby-identifier">o</span> = <span class="ruby-identifier">exclude</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>
|
1368
|
-
<span class="ruby-identifier">h</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
1369
|
-
<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1370
|
-
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_ostruct_recurse</span>( <span class="ruby-identifier">exclude</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">v</span>.<span class="ruby-identifier">respond_to?</span>( <span class="ruby-identifier">:to_ostruct_recurse</span> )
|
1371
|
-
<span class="ruby-keyword kw">end</span>
|
1372
|
-
<span class="ruby-identifier">o</span>.<span class="ruby-identifier">__update__</span>( <span class="ruby-identifier">h</span> )
|
1373
|
-
<span class="ruby-keyword kw">end</span>
|
1374
|
-
</pre>
|
1375
|
-
</div>
|
1376
|
-
</div>
|
1377
|
-
</div>
|
1378
|
-
<div class="method">
|
1379
|
-
<div class="title">
|
1380
|
-
<a name="M000101"></a><b>to_proc</b>()
|
1381
|
-
</div>
|
1382
|
-
<div class="description">
|
1383
|
-
<p>
|
1384
|
-
Constructs a <a href="Proc.html">Proc</a> object from a hash such that the
|
1385
|
-
parameter of the <a href="Proc.html">Proc</a> is assigned the hash keys as
|
1386
|
-
attributes.
|
1387
|
-
</p>
|
1388
|
-
<pre>
|
1389
|
-
h = { :a => 1 }
|
1390
|
-
p = h.to_proc
|
1391
|
-
o = OpenStruct.new
|
1392
|
-
p.call(o)
|
1393
|
-
o.a #=> 1
|
1394
|
-
</pre>
|
1395
|
-
</div>
|
1396
|
-
<div class="sourcecode">
|
1397
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000101_source')" id="l_M000101_source">show source</a> ]</p>
|
1398
|
-
<div id="M000101_source" class="dyn-source">
|
1399
|
-
<pre>
|
1400
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/to_proc.rb, line 15</span>
|
1401
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
|
1402
|
-
<span class="ruby-identifier">lambda</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
|
1403
|
-
<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">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1404
|
-
<span class="ruby-identifier">ke</span> = <span class="ruby-node">"#{k}="</span>
|
1405
|
-
<span class="ruby-identifier">o</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">ke</span>, <span class="ruby-identifier">v</span>)
|
1406
|
-
<span class="ruby-keyword kw">end</span>
|
1407
|
-
<span class="ruby-keyword kw">end</span>
|
1408
|
-
<span class="ruby-keyword kw">end</span>
|
1409
|
-
</pre>
|
1410
|
-
</div>
|
1411
|
-
</div>
|
1412
|
-
</div>
|
1413
|
-
<div class="method">
|
1414
|
-
<div class="title">
|
1415
|
-
<a name="M000102"></a><b>to_proc_with_reponse</b>()
|
1416
|
-
</div>
|
1417
|
-
<div class="sourcecode">
|
1418
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000102_source')" id="l_M000102_source">show source</a> ]</p>
|
1419
|
-
<div id="M000102_source" class="dyn-source">
|
1420
|
-
<pre>
|
1421
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/to_proc.rb, line 24</span>
|
1422
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc_with_reponse</span>
|
1423
|
-
<span class="ruby-identifier">lambda</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
|
1424
|
-
<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">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
1425
|
-
<span class="ruby-identifier">ke</span> = <span class="ruby-node">"#{k}="</span>
|
1426
|
-
<span class="ruby-identifier">o</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">ke</span>, <span class="ruby-identifier">v</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">ke</span>)
|
1427
|
-
<span class="ruby-keyword kw">end</span>
|
1428
|
-
<span class="ruby-keyword kw">end</span>
|
1429
|
-
<span class="ruby-keyword kw">end</span>
|
1430
|
-
</pre>
|
1431
|
-
</div>
|
1432
|
-
</div>
|
1433
|
-
</div>
|
1434
|
-
<div class="method">
|
1435
|
-
<div class="title">
|
1436
|
-
<a name="M000081"></a><b>traverse</b>(&b)
|
1437
|
-
</div>
|
1438
|
-
<div class="description">
|
1439
|
-
<p>
|
1440
|
-
Returns a new hash created by traversing the hash and its subhashes,
|
1441
|
-
executing the given block on the key and value. The block should return a
|
1442
|
-
2-element array of the form +[key, value]+.
|
1443
|
-
</p>
|
1444
|
-
<pre>
|
1445
|
-
h = { "A"=>"A", "B"=>"B" }
|
1446
|
-
g = h.traverse { |k,v| [k.downcase, v] }
|
1447
|
-
g #=> { "a"=>"A", "b"=>"B" }
|
1448
|
-
</pre>
|
1449
|
-
</div>
|
1450
|
-
<div class="sourcecode">
|
1451
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">show source</a> ]</p>
|
1452
|
-
<div id="M000081_source" class="dyn-source">
|
1453
|
-
<pre>
|
1454
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/traverse.rb, line 16</span>
|
1455
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
1456
|
-
<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">k</span>,<span class="ruby-identifier">v</span>)<span class="ruby-operator">|</span>
|
1457
|
-
<span class="ruby-identifier">v</span> = ( <span class="ruby-constant">Hash</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">v</span> <span class="ruby-value">? </span><span class="ruby-identifier">v</span>.<span class="ruby-identifier">traverse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">v</span> )
|
1458
|
-
<span class="ruby-identifier">nk</span>, <span class="ruby-identifier">nv</span> = <span class="ruby-identifier">b</span>[<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>]
|
1459
|
-
<span class="ruby-identifier">h</span>[<span class="ruby-identifier">nk</span>] = <span class="ruby-identifier">nv</span> <span class="ruby-comment cmt">#( Hash === v ? v.traverse(base,&b) : nv )</span>
|
1460
|
-
<span class="ruby-identifier">h</span>
|
1461
|
-
<span class="ruby-keyword kw">end</span>
|
1462
|
-
<span class="ruby-keyword kw">end</span>
|
1463
|
-
</pre>
|
1464
|
-
</div>
|
1465
|
-
</div>
|
1466
|
-
</div>
|
1467
|
-
<div class="method">
|
1468
|
-
<div class="title">
|
1469
|
-
<a name="M000082"></a><b>traverse!</b>(&b)
|
1470
|
-
</div>
|
1471
|
-
<div class="description">
|
1472
|
-
<p>
|
1473
|
-
In place version of traverse, which traverses the hash and its subhashes,
|
1474
|
-
executing the given block on the key and value.
|
1475
|
-
</p>
|
1476
|
-
<pre>
|
1477
|
-
h = { "A"=>"A", "B"=>"B" }
|
1478
|
-
h.traverse! { |k,v| [k.downcase, v] }
|
1479
|
-
h #=> { "a"=>"A", "b"=>"B" }
|
1480
|
-
</pre>
|
1481
|
-
</div>
|
1482
|
-
<div class="sourcecode">
|
1483
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000082_source')" id="l_M000082_source">show source</a> ]</p>
|
1484
|
-
<div id="M000082_source" class="dyn-source">
|
1485
|
-
<pre>
|
1486
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/traverse.rb, line 32</span>
|
1487
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">traverse!</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>)
|
1488
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">replace</span>( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">traverse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">b</span>) )
|
1489
|
-
<span class="ruby-keyword kw">end</span>
|
1490
|
-
</pre>
|
1491
|
-
</div>
|
1492
|
-
</div>
|
1493
|
-
</div>
|
1494
|
-
<div class="method">
|
1495
|
-
<div class="title">
|
1496
|
-
<a name="M000100"></a><b>update_each</b>( {|| ...}
|
1497
|
-
</div>
|
1498
|
-
<div class="description">
|
1499
|
-
<p>
|
1500
|
-
Iterates through each pair and updates a the hash in place. This is
|
1501
|
-
formally equivalent to <a href="Hash.html#M000049">collate!</a> But does
|
1502
|
-
not use <a href="Hash.html#M000048">collate</a> to accomplish the task.
|
1503
|
-
Hence <a href="Hash.html#M000100">update_each</a> is probably a bit faster.
|
1504
|
-
</p>
|
1505
|
-
<pre>
|
1506
|
-
# TODO
|
1507
|
-
</pre>
|
1508
|
-
</div>
|
1509
|
-
<div class="sourcecode">
|
1510
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000100_source')" id="l_M000100_source">show source</a> ]</p>
|
1511
|
-
<div id="M000100_source" class="dyn-source">
|
1512
|
-
<pre>
|
1513
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/update_each.rb, line 14</span>
|
1514
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_each</span> <span class="ruby-comment cmt"># :yield:</span>
|
1515
|
-
<span class="ruby-identifier">dup</span>.<span class="ruby-identifier">each_pair</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">update</span>( <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span>) ); }
|
1516
|
-
<span class="ruby-keyword kw">self</span>
|
1517
|
-
<span class="ruby-keyword kw">end</span>
|
1518
|
-
</pre>
|
1519
|
-
</div>
|
1520
|
-
</div>
|
1521
|
-
</div>
|
1522
|
-
<div class="method">
|
1523
|
-
<div class="title">
|
1524
|
-
<a name="M000096"></a><b>update_keys</b>() {|k| ...}
|
1525
|
-
</div>
|
1526
|
-
<div class="sourcecode">
|
1527
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000096_source')" id="l_M000096_source">show source</a> ]</p>
|
1528
|
-
<div id="M000096_source" class="dyn-source">
|
1529
|
-
<pre>
|
1530
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/update_keys.rb, line 4</span>
|
1531
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_keys</span>
|
1532
|
-
<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) ; <span class="ruby-identifier">store</span>( <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">k</span>), <span class="ruby-identifier">v</span> ) }
|
1533
|
-
<span class="ruby-keyword kw">end</span>
|
1534
|
-
</pre>
|
1535
|
-
</div>
|
1536
|
-
</div>
|
1537
|
-
</div>
|
1538
|
-
<div class="method">
|
1539
|
-
<div class="title">
|
1540
|
-
<a name="M000057"></a><b>update_values</b>() {|v| ...}
|
1541
|
-
</div>
|
1542
|
-
<div class="sourcecode">
|
1543
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show source</a> ]</p>
|
1544
|
-
<div id="M000057_source" class="dyn-source">
|
1545
|
-
<pre>
|
1546
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/update_values.rb, line 4</span>
|
1547
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_values</span>
|
1548
|
-
<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">store</span>( <span class="ruby-identifier">k</span>, <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">v</span>) ) }
|
1549
|
-
<span class="ruby-keyword kw">end</span>
|
1550
|
-
</pre>
|
1551
|
-
</div>
|
1552
|
-
</div>
|
1553
|
-
</div>
|
1554
|
-
<div class="method">
|
1555
|
-
<div class="title">
|
1556
|
-
<a name="M000078"></a><b>variablize_keys</b>( of_class=nil )
|
1557
|
-
</div>
|
1558
|
-
<div class="description">
|
1559
|
-
<p>
|
1560
|
-
Alias for <a href="Hash.html#M000077">keys_to_iv</a>
|
1561
|
-
</p>
|
1562
|
-
</div>
|
1563
|
-
</div>
|
1564
|
-
<div class="method">
|
1565
|
-
<div class="title">
|
1566
|
-
<a name="M000080"></a><b>variablize_keys!</b>( of_class=nil )
|
1567
|
-
</div>
|
1568
|
-
<div class="description">
|
1569
|
-
<p>
|
1570
|
-
Alias for <a href="Hash.html#M000079">keys_to_iv!</a>
|
1571
|
-
</p>
|
1572
|
-
</div>
|
1573
|
-
</div>
|
1574
|
-
<div class="method">
|
1575
|
-
<div class="title">
|
1576
|
-
<a name="M000095"></a><b>weave</b>(h)
|
1577
|
-
</div>
|
1578
|
-
<div class="description">
|
1579
|
-
<p>
|
1580
|
-
Weaves two hashes producing a new hash. The two hashes need to be
|
1581
|
-
compatible according to the following rules for each node:
|
1582
|
-
</p>
|
1583
|
-
<pre>
|
1584
|
-
<tt>
|
1585
|
-
hash, hash => hash (recursive +)
|
1586
|
-
hash, array => error
|
1587
|
-
hash, value => error
|
1588
|
-
array, hash => error
|
1589
|
-
array, array => array + array
|
1590
|
-
array, value => array << value
|
1591
|
-
value, hash => error
|
1592
|
-
value, array => array.unshift(valueB)
|
1593
|
-
valueA, valueB => valueB
|
1594
|
-
</tt>
|
1595
|
-
</pre>
|
1596
|
-
<p>
|
1597
|
-
Example:
|
1598
|
-
</p>
|
1599
|
-
<pre>
|
1600
|
-
# to do
|
1601
|
-
</pre>
|
1602
|
-
</div>
|
1603
|
-
<div class="sourcecode">
|
1604
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000095_source')" id="l_M000095_source">show source</a> ]</p>
|
1605
|
-
<div id="M000095_source" class="dyn-source">
|
1606
|
-
<pre>
|
1607
|
-
<span class="ruby-comment cmt"># File lib/facets/core/hash/weave.rb, line 23</span>
|
1608
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">weave</span>(<span class="ruby-identifier">h</span>)
|
1609
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Hash expected"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">h</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
|
1610
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">clone</span>
|
1611
|
-
<span class="ruby-identifier">h</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">node</span><span class="ruby-operator">|</span>
|
1612
|
-
<span class="ruby-identifier">node_is_hash</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
|
1613
|
-
<span class="ruby-identifier">node_is_array</span> = <span class="ruby-identifier">node</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
|
1614
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">k</span>)
|
1615
|
-
<span class="ruby-identifier">self_node_is_hash</span> = <span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
|
1616
|
-
<span class="ruby-identifier">self_node_is_array</span> = <span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Array</span>)
|
1617
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">self_node_is_hash</span>
|
1618
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node_is_hash</span>
|
1619
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">weave</span>(<span class="ruby-identifier">node</span>)
|
1620
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">node_is_array</span>
|
1621
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Incompatible hash addition'</span> <span class="ruby-comment cmt">#self[k] = node</span>
|
1622
|
-
<span class="ruby-keyword kw">else</span>
|
1623
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Incompatible hash addition'</span> <span class="ruby-comment cmt">#self[k] = node</span>
|
1624
|
-
<span class="ruby-keyword kw">end</span>
|
1625
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">self_node_is_array</span>
|
1626
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node_is_hash</span>
|
1627
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Incompatible hash addition'</span> <span class="ruby-comment cmt">#self[k] = node</span>
|
1628
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">node_is_array</span>
|
1629
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">node</span>
|
1630
|
-
<span class="ruby-keyword kw">else</span>
|
1631
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">node</span>
|
1632
|
-
<span class="ruby-keyword kw">end</span>
|
1633
|
-
<span class="ruby-keyword kw">else</span>
|
1634
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">node_is_hash</span>
|
1635
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">'Incompatible hash addition'</span> <span class="ruby-comment cmt">#self[k] = node</span>
|
1636
|
-
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">node_is_array</span>
|
1637
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>].<span class="ruby-identifier">unshift</span>( <span class="ruby-identifier">node</span> )
|
1638
|
-
<span class="ruby-keyword kw">else</span>
|
1639
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">node</span>
|
1640
|
-
<span class="ruby-keyword kw">end</span>
|
1641
|
-
<span class="ruby-keyword kw">end</span>
|
1642
|
-
<span class="ruby-keyword kw">else</span>
|
1643
|
-
<span class="ruby-identifier">s</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">node</span>
|
1644
|
-
<span class="ruby-keyword kw">end</span>
|
1645
|
-
}
|
1646
|
-
<span class="ruby-identifier">s</span>
|
1647
|
-
<span class="ruby-keyword kw">end</span>
|
1648
|
-
</pre>
|
1649
|
-
</div>
|
1650
|
-
</div>
|
1651
|
-
</div>
|
1652
|
-
</div>
|
1653
|
-
|
1654
|
-
</div>
|
1655
|
-
|
1656
|
-
</body>
|
1657
|
-
</html>
|