facets 1.4.5 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/demo/tkxml/helloworld.rb +32 -0
- data/demo/tkxml/ui.xml +32 -0
- data/doc/AUTHORS +2 -0
- data/doc/ChangeLog +92 -337
- data/doc/ChangeLog.pre1.5 +337 -0
- data/doc/LATEST +41 -0
- data/doc/manifest +1209 -0
- data/lib/facet/array/op_div.rb +1 -0
- data/lib/facet/autoarray.rb +1 -0
- data/lib/facet/cut.rb +1 -0
- data/lib/facet/enumerable/divide.rb +1 -0
- data/lib/facet/eventhook.rb +1 -0
- data/lib/facet/hash/diff.rb +1 -0
- data/lib/facet/hash/having_aquisition.rb +1 -0
- data/lib/facet/hash/having_fallback.rb +1 -0
- data/lib/facet/hash/normalize_keys.rb +1 -0
- data/lib/facet/hash/op_div.rb +1 -0
- data/lib/facet/hash/reverse_merge.rb +1 -0
- data/lib/facet/hash/reverse_update.rb +1 -0
- data/lib/facet/hash/self/auto.rb +1 -0
- data/lib/facet/hash/symbolize_keys.rb +1 -0
- data/lib/facet/hash/to_struct.rb +1 -0
- data/lib/facet/infinity.rb +1 -0
- data/lib/facet/instance_intercept.rb +1 -0
- data/lib/facet/integer/each.rb +1 -0
- data/lib/facet/integer/of.rb +1 -0
- data/lib/facet/kernel/callee.rb +1 -0
- data/lib/facet/kernel/deep_clone.rb +1 -0
- data/lib/facet/kernel/instance_exec.rb +1 -0
- data/lib/facet/kernel/meta.rb +1 -0
- data/lib/facet/kernel/object_clone.rb +1 -0
- data/lib/facet/kernel/object_dup.rb +1 -0
- data/lib/facet/kernel/to_data.rb +1 -0
- data/lib/facet/methodfilter.rb +1 -0
- data/lib/facet/numeric/distance.rb +1 -0
- data/lib/facet/predicate.rb +1 -0
- data/lib/facet/rwdelegator.rb +1 -0
- data/lib/facet/settings.rb +1 -0
- data/lib/facet/string/divide.rb +1 -0
- data/lib/facet/symbol/self/generate.rb +1 -0
- data/lib/facet/tkxml.rb +1 -0
- data/lib/facets.rb +4 -2
- data/lib/facets/core/array/op_div.rb +11 -0
- data/lib/facets/core/enumerable/divide.rb +20 -0
- data/lib/facets/core/hash/diff.rb +8 -0
- data/lib/facets/core/hash/having_aquisition.rb +37 -0
- data/lib/facets/core/hash/having_fallback.rb +28 -0
- data/lib/facets/core/hash/keys_to_s.rb +2 -80
- data/lib/facets/core/hash/keys_to_sym.rb +2 -91
- data/lib/facets/core/hash/normalize_keys.rb +65 -0
- data/lib/facets/core/hash/op_div.rb +8 -0
- data/lib/facets/core/hash/reverse_merge.rb +22 -0
- data/lib/facets/core/hash/reverse_update.rb +3 -0
- data/lib/facets/core/hash/self/auto.rb +28 -0
- data/lib/facets/core/hash/stringify_keys.rb +74 -2
- data/lib/facets/core/hash/symbolize_keys.rb +87 -0
- data/lib/facets/core/hash/to_struct.rb +16 -0
- data/lib/facets/core/integer/each.rb +9 -0
- data/lib/facets/core/integer/of.rb +37 -0
- data/lib/facets/core/kernel/__method__.rb +2 -45
- data/lib/facets/core/kernel/callee.rb +46 -0
- data/lib/facets/core/kernel/deep_clone.rb +50 -0
- data/lib/facets/core/kernel/instance_exec.rb +58 -0
- data/lib/facets/core/kernel/meta.rb +21 -0
- data/lib/facets/core/kernel/object_clone.rb +4 -0
- data/lib/facets/core/kernel/object_dup.rb +2 -0
- data/lib/facets/core/kernel/to_data.rb +114 -0
- data/lib/facets/core/module/alias_method_chain.rb +1 -1
- data/lib/facets/core/module/wrap_method.rb +2 -2
- data/lib/facets/core/nilclass/status.rb +4 -4
- data/lib/facets/core/numeric/distance.rb +37 -0
- data/lib/facets/core/proc/compose.rb +3 -21
- data/lib/facets/core/proc/op_mul.rb +51 -2
- data/lib/facets/core/proc/to_method.rb +37 -36
- data/lib/facets/core/string/divide.rb +43 -0
- data/lib/facets/core/string/singular.rb +152 -67
- data/lib/facets/core/symbol/self/generate.rb +18 -0
- data/lib/facets/more/annattr.rb +4 -4
- data/lib/facets/more/annotation.rb +359 -296
- data/lib/facets/more/aspects.rb +1 -1
- data/lib/facets/more/autoarray.rb +82 -0
- data/lib/facets/more/builderobject.rb +5 -3
- data/lib/facets/more/command.rb +2 -0
- data/lib/facets/more/cut.rb +507 -0
- data/lib/facets/more/dictionary.rb +64 -30
- data/lib/facets/more/downloader.rb +6 -3
- data/lib/facets/more/elementor.rb +26 -16
- data/lib/facets/more/eventhook.rb +113 -0
- data/lib/facets/more/filelist.rb +8 -0
- data/lib/facets/more/functor.rb +28 -11
- data/lib/facets/more/hashbuilder.rb +7 -3
- data/lib/facets/more/infinity.rb +221 -0
- data/{snip/more/aspect.rb → lib/facets/more/instance_intercept.rb} +56 -20
- data/lib/facets/more/json.rb +5 -5
- data/lib/facets/more/methodfilter.rb +118 -0
- data/lib/facets/more/opencascade.rb +35 -66
- data/lib/facets/more/openobject.rb +213 -162
- data/lib/facets/more/orderedhash.rb +7 -0
- data/{snip → lib/facets}/more/predicate.rb +3 -0
- data/lib/facets/more/recorder.rb +9 -3
- data/lib/facets/more/reference.rb +7 -2
- data/lib/facets/more/rexmlbuilder.rb +7 -2
- data/lib/facets/more/rwdelegator.rb +51 -0
- data/lib/facets/more/settings.rb +219 -0
- data/lib/facets/more/snapshot.rb +4 -2
- data/lib/facets/more/tagiterator.rb +4 -4
- data/lib/facets/more/taskable.rb +5 -5
- data/lib/facets/more/tkxml.rb +171 -0
- data/meta/projectinfo +38 -0
- data/{Reapfile → meta/reapfile} +0 -0
- data/meta/task +74 -0
- data/meta/tasks/calibre.rb +16 -0
- data/meta/version +1 -0
- data/test/lib/facets/core/array/test_at_rand.rb +1 -1
- data/test/lib/facets/core/array/test_delete_unless.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values.rb +1 -1
- data/test/lib/facets/core/array/test_delete_values_at.rb +1 -1
- data/test/lib/facets/core/array/test_first.rb +1 -1
- data/test/lib/facets/core/array/test_head.rb +1 -1
- data/test/lib/facets/core/array/test_last_index.rb +1 -1
- data/test/lib/facets/core/array/test_merge.rb +1 -1
- data/test/lib/facets/core/array/test_mid.rb +1 -1
- data/test/lib/facets/core/array/test_middle.rb +1 -1
- data/test/lib/facets/core/array/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/array/test_op_store.rb +1 -1
- data/test/lib/facets/core/array/test_pick.rb +1 -1
- data/test/lib/facets/core/array/test_pos.rb +1 -1
- data/test/lib/facets/core/array/test_pot.rb +1 -1
- data/test/lib/facets/core/array/test_pull.rb +1 -1
- data/test/lib/facets/core/array/test_rand_index.rb +1 -1
- data/test/lib/facets/core/array/test_rand_subset.rb +1 -1
- data/test/lib/facets/core/array/test_range.rb +1 -1
- data/test/lib/facets/core/array/test_rotate.rb +1 -1
- data/test/lib/facets/core/array/test_select.rb +1 -1
- data/test/lib/facets/core/array/test_shuffle.rb +1 -1
- data/test/lib/facets/core/array/test_thru.rb +1 -1
- data/test/lib/facets/core/array/test_to_b.rb +1 -1
- data/test/lib/facets/core/array/test_to_h.rb +1 -1
- data/test/lib/facets/core/array/test_to_hash.rb +1 -1
- data/test/lib/facets/core/binding/self/test_of_caller.rb +1 -1
- data/test/lib/facets/core/binding/test___LINE__.rb +1 -1
- data/test/lib/facets/core/binding/test_call_stack.rb +1 -1
- data/test/lib/facets/core/binding/test_called.rb +1 -1
- data/test/lib/facets/core/binding/test_caller.rb +1 -1
- data/test/lib/facets/core/binding/test_defined.rb +1 -1
- data/test/lib/facets/core/binding/test_eval.rb +1 -1
- data/test/lib/facets/core/binding/test_local_variables.rb +1 -1
- data/test/lib/facets/core/binding/test_method_name.rb +1 -1
- data/test/lib/facets/core/binding/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/binding/test_op_store.rb +1 -1
- data/test/lib/facets/core/binding/test_self.rb +1 -1
- data/test/lib/facets/core/class/test_cattr.rb +1 -1
- data/test/lib/facets/core/class/test_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_method_name.rb +1 -1
- data/test/lib/facets/core/class/test_remove_descendents.rb +1 -1
- data/test/lib/facets/core/class/test_unix_path.rb +1 -1
- data/test/lib/facets/core/comparable/test_at_least.rb +1 -1
- data/test/lib/facets/core/comparable/test_clip.rb +1 -1
- data/test/lib/facets/core/comparable/test_cmp.rb +1 -1
- data/test/lib/facets/core/continuation/self/test_create.rb +1 -1
- data/test/lib/facets/core/date/test_days_in_month.rb +1 -1
- data/test/lib/facets/core/date/test_days_of_month.rb +1 -1
- data/test/lib/facets/core/date/test_stamp.rb +1 -1
- data/test/lib/facets/core/date/test_to_date.rb +1 -1
- data/test/lib/facets/core/date/test_to_s.rb +1 -1
- data/test/lib/facets/core/date/test_to_time.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ancestor.rb +1 -1
- data/test/lib/facets/core/dir/self/test_ascend.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_combinations.rb +1 -1
- data/test/lib/facets/core/enumerable/self/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_collect_with_index.rb +1 -1
- data/test/lib/facets/core/enumerable/test_commonality.rb +1 -1
- data/test/lib/facets/core/enumerable/test_compact_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_count.rb +1 -1
- data/test/lib/facets/core/enumerable/test_cross.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_combination.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_slice.rb +1 -1
- data/test/lib/facets/core/enumerable/test_each_unique_pair.rb +1 -1
- data/test/lib/facets/core/enumerable/test_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_every.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ew.rb +1 -1
- data/test/lib/facets/core/enumerable/test_filter_collect.rb +1 -1
- data/test/lib/facets/core/enumerable/test_find_collisions.rb +1 -1
- data/test/lib/facets/core/enumerable/test_frequency.rb +1 -1
- data/test/lib/facets/core/enumerable/test_graph.rb +1 -1
- data/test/lib/facets/core/enumerable/test_ideal_entropy.rb +1 -1
- data/test/lib/facets/core/enumerable/test_none.rb +1 -1
- data/test/lib/facets/core/enumerable/test_occur.rb +1 -1
- data/test/lib/facets/core/enumerable/test_one.rb +1 -1
- data/test/lib/facets/core/enumerable/test_op_pow.rb +1 -1
- data/test/lib/facets/core/enumerable/test_partition_by.rb +1 -1
- data/test/lib/facets/core/enumerable/test_permute.rb +1 -1
- data/test/lib/facets/core/enumerable/test_probability.rb +1 -1
- data/test/lib/facets/core/enumerable/test_to_h.rb +1 -1
- data/test/lib/facets/core/enumerable/test_uniq_by.rb +1 -1
- data/test/lib/facets/core/file/self/test_create.rb +1 -1
- data/test/lib/facets/core/file/self/test_open_as_string.rb +1 -1
- data/test/lib/facets/core/file/self/test_read_list.rb +1 -1
- data/test/lib/facets/core/file/self/test_sanitize.rb +1 -1
- data/test/lib/facets/core/file/self/test_split_all.rb +1 -1
- data/test/lib/facets/core/float/test_round_at.rb +1 -1
- data/test/lib/facets/core/float/test_round_to.rb +1 -1
- data/test/lib/facets/core/hash/self/test_zipnew.rb +1 -1
- data/test/lib/facets/core/hash/test_alias.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_assert_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_at.rb +1 -1
- data/test/lib/facets/core/hash/test_collate.rb +1 -1
- data/test/lib/facets/core/hash/test_each.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_index.rb +1 -1
- data/test/lib/facets/core/hash/test_each_with_key.rb +1 -1
- data/test/lib/facets/core/hash/test_graph.rb +1 -1
- data/test/lib/facets/core/hash/test_has_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_has_only_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_inverse.rb +1 -1
- data/test/lib/facets/core/hash/test_normalize_keys.rb +34 -0
- data/test/lib/facets/core/hash/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/hash/test_op_lshift.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_key.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_pair.rb +1 -1
- data/test/lib/facets/core/hash/test_rand_value.rb +1 -1
- data/test/lib/facets/core/hash/test_replace_each.rb +1 -1
- data/test/lib/facets/core/hash/test_shuffle.rb +1 -1
- data/test/lib/facets/core/hash/test_slice.rb +1 -1
- data/test/lib/facets/core/hash/{test_keys_to_s.rb → test_stringify_keys.rb} +5 -5
- data/test/lib/facets/core/hash/test_swap.rb +1 -1
- data/test/lib/facets/core/hash/test_swapkey.rb +1 -1
- data/test/lib/facets/core/hash/{test_keys_to_sym.rb → test_symbolize_keys.rb} +5 -5
- data/test/lib/facets/core/hash/test_to_h.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct.rb +1 -1
- data/test/lib/facets/core/hash/test_to_ostruct_recurse.rb +1 -1
- data/test/lib/facets/core/hash/test_traverse.rb +1 -1
- data/test/lib/facets/core/hash/test_update_each.rb +1 -1
- data/test/lib/facets/core/hash/test_update_keys.rb +1 -1
- data/test/lib/facets/core/hash/test_update_values.rb +1 -1
- data/test/lib/facets/core/hash/test_weave.rb +1 -1
- data/test/lib/facets/core/integer/test_factorial.rb +1 -1
- data/test/lib/facets/core/integer/test_multiple.rb +1 -1
- data/test/lib/facets/core/integer/test_of.rb +28 -0
- data/test/lib/facets/core/integer/test_ordinal.rb +1 -1
- data/test/lib/facets/core/integer/test_times_collect.rb +1 -1
- data/test/lib/facets/core/kernel/test___class__.rb +1 -1
- data/test/lib/facets/core/kernel/test___method__.rb +1 -1
- data/test/lib/facets/core/kernel/test_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_assign_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_bug.rb +1 -1
- data/test/lib/facets/core/kernel/test_call_stack.rb +1 -1
- data/test/lib/facets/core/kernel/test_called.rb +1 -1
- data/test/lib/facets/core/kernel/test_callee.rb +26 -0
- data/test/lib/facets/core/kernel/test_constant.rb +1 -1
- data/test/lib/facets/core/kernel/test_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_deep_copy.rb +1 -1
- data/test/lib/facets/core/kernel/test_demo.rb +1 -1
- data/test/lib/facets/core/kernel/test_fn.rb +1 -1
- data/test/lib/facets/core/kernel/test_get_by_id.rb +1 -1
- data/test/lib/facets/core/kernel/test_here.rb +1 -1
- data/test/lib/facets/core/kernel/test_in.rb +1 -1
- data/test/lib/facets/core/kernel/test_instance_exec.rb +52 -0
- data/test/lib/facets/core/kernel/test_maybe.rb +1 -1
- data/test/lib/facets/core/kernel/test_metaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_method.rb +1 -1
- data/test/lib/facets/core/kernel/test_methods.rb +1 -1
- data/test/lib/facets/core/kernel/test_new.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_object_hexid.rb +1 -1
- data/test/lib/facets/core/kernel/test_quaclass.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_all.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_esc.rb +1 -1
- data/test/lib/facets/core/kernel/test_require_facet.rb +1 -1
- data/test/lib/facets/core/kernel/test_resc.rb +1 -1
- data/test/lib/facets/core/kernel/test_returning.rb +1 -1
- data/test/lib/facets/core/kernel/test_send_as.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_from.rb +1 -1
- data/test/lib/facets/core/kernel/test_set_with.rb +1 -1
- data/test/lib/facets/core/kernel/test_silently.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton.rb +1 -1
- data/test/lib/facets/core/kernel/test_singleton_class.rb +1 -1
- data/test/lib/facets/core/kernel/test_superior.rb +1 -1
- data/test/lib/facets/core/kernel/test_supermethod.rb +1 -1
- data/test/lib/facets/core/kernel/test_this.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_b.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_bool.rb +1 -1
- data/test/lib/facets/core/kernel/test_to_data.rb +59 -0
- data/test/lib/facets/core/kernel/test_uri.rb +1 -1
- data/test/lib/facets/core/kernel/test_val.rb +1 -1
- data/test/lib/facets/core/kernel/test_with_accessor.rb +1 -1
- data/test/lib/facets/core/matchdata/test_match.rb +1 -1
- data/test/lib/facets/core/matchdata/test_matchtree.rb +1 -1
- data/test/lib/facets/core/module/test_abstract.rb +1 -1
- data/test/lib/facets/core/module/test_alias_module_function.rb +1 -1
- data/test/lib/facets/core/module/test_ancestor.rb +1 -1
- data/test/lib/facets/core/module/test_basename.rb +1 -1
- data/test/lib/facets/core/module/test_by_name.rb +1 -1
- data/test/lib/facets/core/module/test_class_extension.rb +1 -1
- data/test/lib/facets/core/module/test_clone_using.rb +1 -1
- data/test/lib/facets/core/module/test_dirname.rb +1 -1
- data/test/lib/facets/core/module/test_equate_on.rb +1 -1
- data/test/lib/facets/core/module/test_include_as.rb +1 -1
- data/test/lib/facets/core/module/test_initializer.rb +1 -1
- data/test/lib/facets/core/module/test_instance_methods.rb +1 -1
- data/test/lib/facets/core/module/test_integrate.rb +1 -1
- data/test/lib/facets/core/module/test_memoize.rb +1 -1
- data/test/lib/facets/core/module/test_modspace.rb +1 -1
- data/test/lib/facets/core/module/test_namespace.rb +1 -1
- data/test/lib/facets/core/module/test_nesting.rb +1 -1
- data/test/lib/facets/core/module/test_nodef.rb +1 -1
- data/test/lib/facets/core/module/test_on_included.rb +1 -1
- data/test/lib/facets/core/module/test_redef.rb +1 -1
- data/test/lib/facets/core/module/test_redefine_method.rb +1 -1
- data/test/lib/facets/core/module/test_redirect.rb +1 -1
- data/test/lib/facets/core/module/test_redirect_method.rb +1 -1
- data/test/lib/facets/core/module/test_remove.rb +1 -1
- data/test/lib/facets/core/module/test_rename.rb +1 -1
- data/test/lib/facets/core/module/test_rename_method.rb +1 -1
- data/test/lib/facets/core/module/test_revisal.rb +1 -1
- data/test/lib/facets/core/module/test_shadow_method.rb +1 -1
- data/test/lib/facets/core/module/test_sort_on.rb +1 -1
- data/test/lib/facets/core/module/test_this.rb +1 -1
- data/test/lib/facets/core/module/test_wrap.rb +1 -1
- data/test/lib/facets/core/module/test_wrap_method.rb +1 -1
- data/test/lib/facets/core/nilclass/test_blank.rb +1 -1
- data/test/lib/facets/core/nilclass/test_empty.rb +1 -1
- data/test/lib/facets/core/nilclass/test_include.rb +1 -1
- data/test/lib/facets/core/nilclass/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/nilclass/test_size.rb +1 -1
- data/test/lib/facets/core/nilclass/test_to_h.rb +1 -1
- data/test/lib/facets/core/numeric/test_approx.rb +1 -1
- data/test/lib/facets/core/numeric/test_ceil_multiple.rb +1 -1
- data/test/lib/facets/core/numeric/test_distance.rb +28 -0
- data/test/lib/facets/core/numeric/test_succ.rb +1 -1
- data/test/lib/facets/core/numeric/test_to_b.rb +1 -1
- data/test/lib/facets/core/ostruct/test___merge__.rb +1 -1
- data/test/lib/facets/core/ostruct/test___update__.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_fetch.rb +1 -1
- data/test/lib/facets/core/ostruct/test_op_store.rb +1 -1
- data/test/lib/facets/core/proc/test_compose.rb +1 -8
- data/test/lib/facets/core/proc/test_op_mul.rb +34 -0
- data/test/lib/facets/core/proc/test_to_method.rb +15 -2
- data/test/lib/facets/core/range/test_to_r.rb +1 -1
- data/test/lib/facets/core/range/test_to_range.rb +1 -1
- data/test/lib/facets/core/range/test_umbrella.rb +1 -1
- data/test/lib/facets/core/range/test_within.rb +1 -1
- data/test/lib/facets/core/regexp/test_arity.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_re.rb +1 -1
- data/test/lib/facets/core/regexp/test_to_regexp.rb +1 -1
- data/test/lib/facets/core/string/self/test_interpolate.rb +1 -1
- data/test/lib/facets/core/string/self/test_patterns.rb +1 -1
- data/test/lib/facets/core/string/self/test_rand_letter.rb +1 -1
- data/test/lib/facets/core/string/test_align_center.rb +1 -1
- data/test/lib/facets/core/string/test_at_rand.rb +1 -1
- data/test/lib/facets/core/string/test_basename.rb +1 -1
- data/test/lib/facets/core/string/test_blank.rb +1 -1
- data/test/lib/facets/core/string/test_bracket.rb +1 -1
- data/test/lib/facets/core/string/test_camelcase.rb +1 -1
- data/test/lib/facets/core/string/test_camelize.rb +1 -1
- data/test/lib/facets/core/string/test_capitalized.rb +1 -1
- data/test/lib/facets/core/string/test_chars.rb +1 -1
- data/test/lib/facets/core/string/test_cmp.rb +1 -1
- data/test/lib/facets/core/string/test_demodulize.rb +1 -1
- data/test/lib/facets/core/string/test_divide.rb +29 -0
- data/test/lib/facets/core/string/test_downcase.rb +1 -1
- data/test/lib/facets/core/string/test_dresner.rb +1 -1
- data/test/lib/facets/core/string/test_each_char.rb +1 -1
- data/test/lib/facets/core/string/test_each_word.rb +1 -1
- data/test/lib/facets/core/string/test_first.rb +1 -1
- data/test/lib/facets/core/string/test_fold.rb +1 -1
- data/test/lib/facets/core/string/test_humanize.rb +1 -1
- data/test/lib/facets/core/string/test_indent.rb +1 -1
- data/test/lib/facets/core/string/test_index_all.rb +1 -1
- data/test/lib/facets/core/string/test_last.rb +1 -1
- data/test/lib/facets/core/string/test_line_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_lines.rb +1 -1
- data/test/lib/facets/core/string/test_lowercase.rb +1 -1
- data/test/lib/facets/core/string/test_margin.rb +1 -1
- data/test/lib/facets/core/string/test_methodize.rb +1 -1
- data/test/lib/facets/core/string/test_modulize.rb +1 -1
- data/test/lib/facets/core/string/test_mscan.rb +1 -1
- data/test/lib/facets/core/string/test_natcmp.rb +1 -1
- data/test/lib/facets/core/string/test_nchar.rb +1 -1
- data/test/lib/facets/core/string/test_pathize.rb +1 -1
- data/test/lib/facets/core/string/test_pop.rb +1 -1
- data/test/lib/facets/core/string/test_pot.rb +1 -1
- data/test/lib/facets/core/string/test_push.rb +1 -1
- data/test/lib/facets/core/string/test_quote.rb +1 -1
- data/test/lib/facets/core/string/test_rand_byte.rb +1 -1
- data/test/lib/facets/core/string/test_rand_index.rb +1 -1
- data/test/lib/facets/core/string/test_range.rb +1 -1
- data/test/lib/facets/core/string/test_range_all.rb +1 -1
- data/test/lib/facets/core/string/test_range_of_line.rb +1 -1
- data/test/lib/facets/core/string/test_regesc.rb +1 -1
- data/test/lib/facets/core/string/test_shatter.rb +1 -1
- data/test/lib/facets/core/string/test_shift.rb +1 -1
- data/test/lib/facets/core/string/test_shuffle.rb +1 -1
- data/test/lib/facets/core/string/test_similarity.rb +1 -1
- data/test/lib/facets/core/string/test_singular.rb +62 -8
- data/test/lib/facets/core/string/test_soundex.rb +1 -1
- data/test/lib/facets/core/string/test_succ.rb +1 -1
- data/test/lib/facets/core/string/test_to_a.rb +1 -1
- data/test/lib/facets/core/string/test_to_b.rb +1 -1
- data/test/lib/facets/core/string/test_to_const.rb +1 -1
- data/test/lib/facets/core/string/test_to_date.rb +1 -1
- data/test/lib/facets/core/string/test_to_proc.rb +1 -1
- data/test/lib/facets/core/string/test_to_re.rb +1 -1
- data/test/lib/facets/core/string/test_to_time.rb +1 -1
- data/test/lib/facets/core/string/test_unix_crypt.rb +1 -1
- data/test/lib/facets/core/string/test_unpack.rb +1 -1
- data/test/lib/facets/core/string/test_unshift.rb +1 -1
- data/test/lib/facets/core/string/test_upcase.rb +1 -1
- data/test/lib/facets/core/string/test_whitespace.rb +1 -1
- data/test/lib/facets/core/string/test_word_filter.rb +1 -1
- data/test/lib/facets/core/string/test_word_wrap.rb +1 -1
- data/test/lib/facets/core/string/test_words.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_camelize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalize.rb +1 -1
- data/test/lib/facets/core/symbol/test_capitalized.rb +1 -1
- data/test/lib/facets/core/symbol/test_downcase.rb +1 -1
- data/test/lib/facets/core/symbol/test_not.rb +1 -1
- data/test/lib/facets/core/symbol/test_pad.rb +1 -1
- data/test/lib/facets/core/symbol/test_succ.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_const.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_proc.rb +1 -1
- data/test/lib/facets/core/symbol/test_to_str.rb +1 -1
- data/test/lib/facets/core/symbol/test_underscore.rb +1 -1
- data/test/lib/facets/core/symbol/test_upcase.rb +1 -1
- data/test/lib/facets/core/time/test_change.rb +1 -1
- data/test/lib/facets/core/time/test_elapse.rb +1 -1
- data/test/lib/facets/core/time/test_stamp.rb +1 -1
- data/test/lib/facets/core/time/test_to_date.rb +1 -1
- data/test/lib/facets/core/time/test_to_s.rb +1 -1
- data/test/lib/facets/core/time/test_to_time.rb +1 -1
- data/test/lib/facets/more/test_annattr.rb +1 -1
- data/test/lib/facets/more/test_annotation.rb +225 -113
- data/test/lib/facets/more/test_ansicode.rb +1 -1
- data/test/lib/facets/more/test_association.rb +1 -1
- data/test/lib/facets/more/test_autoarray.rb +32 -0
- data/test/lib/facets/more/test_basicobject.rb +1 -1
- data/test/lib/facets/more/test_bbcode.rb +1 -1
- data/test/lib/facets/more/test_binaryreader.rb +1 -1
- data/test/lib/facets/more/test_bitmask.rb +1 -1
- data/test/lib/facets/more/test_bytes.rb +1 -1
- data/test/lib/facets/more/test_classmethods.rb +1 -1
- data/test/lib/facets/more/test_command.rb +1 -1
- data/test/lib/facets/more/test_coroutine.rb +1 -1
- data/test/lib/facets/more/test_crypt.rb +1 -1
- data/test/lib/facets/more/test_cut.rb +198 -0
- data/test/lib/facets/more/test_dictionary.rb +1 -1
- data/test/lib/facets/more/test_elementor.rb +5 -1
- data/test/lib/facets/more/test_enumerablepass.rb +1 -1
- data/test/lib/facets/more/test_floatstring.rb +1 -1
- data/test/lib/facets/more/test_functor.rb +1 -1
- data/test/lib/facets/more/test_htmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_infinity.rb +50 -0
- data/test/lib/facets/more/test_inheritor.rb +1 -1
- data/test/lib/facets/more/test_instance_intercept.rb +50 -0
- data/test/lib/facets/more/test_interval.rb +1 -1
- data/test/lib/facets/more/test_json.rb +1 -1
- data/test/lib/facets/more/test_lisp.rb +1 -1
- data/test/lib/facets/more/test_lisp_format.rb +1 -1
- data/test/lib/facets/more/test_lrucache.rb +1 -1
- data/test/lib/facets/more/test_mathconstants.rb +1 -1
- data/test/lib/facets/more/test_methodfilter.rb +45 -0
- data/test/lib/facets/more/test_methodprobe.rb +1 -1
- data/test/lib/facets/more/test_multipliers.rb +1 -1
- data/test/lib/facets/more/test_multiton.rb +1 -1
- data/test/lib/facets/more/test_nackclass.rb +1 -1
- data/test/lib/facets/more/test_nilcomparable.rb +1 -1
- data/test/lib/facets/more/test_opencascade.rb +24 -15
- data/test/lib/facets/more/test_openobject.rb +70 -22
- data/test/lib/facets/more/test_overload.rb +1 -1
- data/test/lib/facets/more/test_paramix.rb +1 -1
- data/test/lib/facets/more/test_pqueue.rb +1 -1
- data/test/lib/facets/more/test_predicate.rb +79 -0
- data/test/lib/facets/more/test_preinitialize.rb +1 -1
- data/test/lib/facets/more/test_promoteself.rb +1 -1
- data/test/lib/facets/more/test_recorder.rb +1 -1
- data/test/lib/facets/more/test_snapshot.rb +1 -1
- data/test/lib/facets/more/test_statichash.rb +1 -1
- data/test/lib/facets/more/test_syncarray.rb +1 -1
- data/test/lib/facets/more/test_synchash.rb +1 -1
- data/test/lib/facets/more/test_tagiterator.rb +1 -1
- data/test/lib/facets/more/test_taskable.rb +1 -1
- data/test/lib/facets/more/test_timer.rb +1 -1
- data/test/lib/facets/more/test_times.rb +1 -1
- data/test/lib/facets/more/test_tuple.rb +1 -1
- data/test/lib/facets/more/test_typecast.rb +1 -1
- data/test/lib/facets/more/test_uninheritable.rb +1 -1
- data/test/lib/facets/more/test_units.rb +1 -1
- data/test/lib/facets/more/test_xmlbuilder.rb +1 -1
- data/test/lib/facets/more/test_xmlhelper.rb +1 -1
- data/test/lib/facets/more/test_xoxo.rb +1 -1
- data/test/lib/facets/more/test_yamlstruct.rb +1 -1
- metadata +1147 -2081
- data/doc/api/core/classes/Array.html +0 -1356
- data/doc/api/core/classes/Binding.html +0 -538
- data/doc/api/core/classes/Class.html +0 -476
- data/doc/api/core/classes/Comparable.html +0 -231
- data/doc/api/core/classes/Config.html +0 -120
- data/doc/api/core/classes/Continuation.html +0 -168
- data/doc/api/core/classes/Date.html +0 -219
- data/doc/api/core/classes/Dir.html +0 -208
- data/doc/api/core/classes/Enumerable.html +0 -1462
- data/doc/api/core/classes/FalseClass.html +0 -115
- data/doc/api/core/classes/File.html +0 -383
- data/doc/api/core/classes/FileUtils.html +0 -468
- data/doc/api/core/classes/Float.html +0 -157
- data/doc/api/core/classes/Gem.html +0 -150
- data/doc/api/core/classes/Hash.html +0 -1627
- data/doc/api/core/classes/Integer.html +0 -353
- data/doc/api/core/classes/Kernal.html +0 -86
- data/doc/api/core/classes/Kernel.html +0 -2010
- data/doc/api/core/classes/Logger.html +0 -157
- data/doc/api/core/classes/MatchData.html +0 -195
- data/doc/api/core/classes/Module.html +0 -1812
- data/doc/api/core/classes/NackClass.html +0 -92
- data/doc/api/core/classes/NilClass.html +0 -385
- data/doc/api/core/classes/Numeric.html +0 -306
- data/doc/api/core/classes/Object.html +0 -332
- data/doc/api/core/classes/OpenStruct.html +0 -315
- data/doc/api/core/classes/Pathname.html +0 -154
- data/doc/api/core/classes/Proc.html +0 -154
- data/doc/api/core/classes/Range.html +0 -235
- data/doc/api/core/classes/Regexp.html +0 -185
- data/doc/api/core/classes/ScriptBug.html +0 -92
- data/doc/api/core/classes/String.html +0 -3250
- data/doc/api/core/classes/Symbol.html +0 -463
- data/doc/api/core/classes/Time.html +0 -307
- data/doc/api/core/classes/TrueClass.html +0 -115
- data/doc/api/core/classes/UnboundMethod.html +0 -121
- data/doc/api/core/created.rid +0 -1
- data/doc/api/core/files/COPYING.html +0 -517
- data/doc/api/core/files/README.html +0 -386
- data/doc/api/core/files/lib/facets/core/all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/at_rand_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/body_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/delete_unless_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/delete_values_at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/delete_values_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/each_with_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/first_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/foot_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/head_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/join_sentence_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/last_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/last_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/merge_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/mid_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/middle_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_fetch_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_mod_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/op_store_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/array/pick_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pos_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pot_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/pull_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rand_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rand_subset_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/rotate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/select_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/shuffle_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/store_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/tail_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/array/thru_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/to_hash_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/array/unzip_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/binding/__DIR___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/binding/__FILE___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/binding/__LINE___rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/call_stack_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/called_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/caller_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/defined_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/eval_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/binding/local_variables_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/method_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/op_fetch_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/op_store_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/binding/self/of_caller_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding/self_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/binding_rb.html +0 -109
- data/doc/api/core/files/lib/facets/core/class/by_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/class/cattr_accessor_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/cattr_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/cattr_reader_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/cattr_writer_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/descendents_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/class/remove_descendents_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/class/remove_subclasses_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/subclasses_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/class/to_proc_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/class/unix_path_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/at_least_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/at_most_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/comparable/cap_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/comparable/clip_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/comparable/cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/config/datadir_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/continuation/self/create_rb.html +0 -148
- data/doc/api/core/files/lib/facets/core/date/days_in_month_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/days_of_month_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/stamp_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_date_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_s_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/date/to_time_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/dir/self/ancestor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/ascend_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/descend_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/ls_r_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/dir/self/recurse_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/accumulate_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/cascade_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/collect_if_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/collect_with_counter_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/collect_with_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/commonality_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/compact_collect_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/compact_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/count_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/cross_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/each_by_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/each_combination_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_pair_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_permutation_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/each_slice_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/each_unique_pair_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/each_with_counter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/elementwise_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/entropy_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/enumerable/every_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/ew_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/filter_collect_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/filter_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/find_collisions_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/frequency_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/graph_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/ideal_entropy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/map_if_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/map_with_counter_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/map_with_index_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/enumerable/mode_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/none_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/nonuniq_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/occur_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/one_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/op_pow_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/partition_by_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/permute_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/probability_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/project_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/self/combinations_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/self/cross_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/enumerable/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/uniq_by_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/enumerable/where_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/append_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/create_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/open_as_string_rb.html +0 -118
- data/doc/api/core/files/lib/facets/core/file/self/read_binary_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/read_list_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/file/self/rootname_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/file/self/sanitize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/file/self/split_all_rb.html +0 -101
- data/doc/api/core/files/lib/facets/core/file/self/write_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/head_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/fileutils/safe_ln_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/slice_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/split_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/fileutils/tail_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/fileutils/wc_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/whereis_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/fileutils/which_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/float/approx_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/float/round_at_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/float/round_off_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/float/round_to_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/gem/self/active_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/gem/self/gempath_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/gem/self/gemspec_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/alias_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/assert_has_keys_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/assert_has_only_keys_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/collate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/delete_unless_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/each_with_index_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/hash/each_with_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/graph_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/has_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/has_only_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/inverse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/join_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/keys_to_s_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/keys_to_sym_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/op_fetch_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/op_lshift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/op_store_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/rand_key_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/rand_pair_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/rand_value_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/replace_each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/self/zipnew_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/shuffle_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/slice_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/stringify_keys_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/swap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/swapkey_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/symoblize_keys_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/hash/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/to_ostruct_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/hash/to_ostruct_recurse_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/hash/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/traverse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_each_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/update_values_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/variablize_keys_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/hash/weave_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/inflect_rb.html +0 -117
- data/doc/api/core/files/lib/facets/core/integer/even_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/fac_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/fact_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/factorial_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/multiple_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/odd_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/integer/ordinal_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/times_collect_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/integer/times_map_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/__DIR___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__callee___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/__class___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__get___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__method___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/__self___rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/__set___rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/as_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/assign_from_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/assign_with_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_files_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_glob_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/autoreload_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/bool_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/bug_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/cache_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/call_stack_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/called_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/complete_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/constant_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/copy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/deep_copy_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/demo_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/eigenclass_rb.html +0 -103
- data/doc/api/core/files/lib/facets/core/kernel/false_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/fn_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/generate_method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/get_by_id_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/here_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/in_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/instance_assign_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/instvar_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/is_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/maybe_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/metaclass_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/methods_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/nack_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/kernel/new_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/object_class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/object_hexid_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/op_esc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/own_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/p_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/pp_exception_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/quaclass_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/require_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/require_esc_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/require_facet_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/require_local_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/resc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/respond_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/returning_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/send_as_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/set_from_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/set_with_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/silence_warnings_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/silently_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/singleton_class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/singleton_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/superior_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/supermethod_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/this_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/to_bool_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/true_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/unuri_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/uri_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/kernel/val_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/warn_with_line_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/with_accessor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/kernel/with_reader_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/kernel/with_writer_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/logger/format_message_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/logger/format_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/matchdata/match_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/matchdata/matchset_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/matchdata/matchtree_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/abstract_rb.html +0 -105
- data/doc/api/core/files/lib/facets/core/module/alias_method_chain_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/alias_module_function_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/ancestor_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_query_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/attr_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_setter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/attr_tester_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/attr_validator_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/basename_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/by_name_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/class_extension_rb.html +0 -124
- data/doc/api/core/files/lib/facets/core/module/class_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/clone_removing_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/clone_renaming_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/clone_using_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/dirname_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/equate_on_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/generate_instance_method_name_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/include_as_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/initializer_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/instance_methods_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/integrate_rb.html +0 -104
- data/doc/api/core/files/lib/facets/core/module/is_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/memoize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/modspace_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/module/namespace_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/nesting_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/nodef_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/on_included_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redef_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/redefine_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redirect_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/redirect_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/remove_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/rename_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/rename_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/revisal_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/module/shadow_all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/shadow_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/sort_on_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/this_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/module/wrap_method_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/module/wrap_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/nil_as_emptiness_rb.html +0 -116
- data/doc/api/core/files/lib/facets/core/nilclass/blank_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/empty_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/include_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/length_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/nilclass/op_cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/op_fetch_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/size_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/status_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/nilclass/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/approx_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/ceil_multiple_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/pred_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/numeric/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/numeric/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct/__merge___rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/ostruct/__table___rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct/__update___rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/ostruct/instance_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/op_fetch_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/op_store_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/ostruct/to_h_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/ostruct_rb.html +0 -102
- data/doc/api/core/files/lib/facets/core/pathname/ascend_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/pathname/descend_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/proc/compose_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/proc/op_mul_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/proc/to_method_rb.html +0 -133
- data/doc/api/core/files/lib/facets/core/random_rb.html +0 -111
- data/doc/api/core/files/lib/facets/core/range/to_r_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/to_range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/umbrella_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/range/within_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/regexp/arity_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/regexp/to_re_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/regexp/to_regexp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/align_center_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/align_left_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/align_right_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/at_rand_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/at_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/basename_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/blank_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/bracket_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/brief_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/bytes_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/camelcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/camelize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/capitalized_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/chars_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/cmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/demodulize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/dequote_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/downcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/dresner_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/each_char_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/each_word_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/ends_with_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/first_char_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/first_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/fold_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/format_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/humanize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/indent_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/index_all_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/last_char_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/last_rb.html +0 -98
- data/doc/api/core/files/lib/facets/core/string/line_wrap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/lines_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/lowercase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/margin_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/methodize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/modulize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/mscan_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/natcmp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/nchar_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/ordinal_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/pathize_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/plural_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/pop_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/pot_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/pull_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/push_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/quote_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/rand_byte_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/rand_index_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/range_all_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/range_of_line_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/range_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/regesc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/format_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/interpolate_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/patterns_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/rand_letter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/self/random_rb.html +0 -99
- data/doc/api/core/files/lib/facets/core/string/shatter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shell_escape_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/shuffle_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/similarity_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/singular_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/soundex_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/starts_with_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/tab_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/tabto_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/to_a_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_b_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_const_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_date_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/string/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_re_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/to_rx_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/to_time_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/unbracket_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/underscore_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/unix_crypt_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/unpack_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/unshift_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/upcase_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/uppercase_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/string/whitespace_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/string/word_filter_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/word_wrap_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string/words_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/string_as_array_rb.html +0 -109
- data/doc/api/core/files/lib/facets/core/symbol/camelcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/camelize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/capitalize_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/capitalized_rb.html +0 -97
- data/doc/api/core/files/lib/facets/core/symbol/downcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/not_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/pad_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/succ_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/to_const_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/to_proc_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/to_str_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/symbol/underscore_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/symbol/upcase_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/change_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/elapse_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/self/days_extrema_rb.html +0 -114
- data/doc/api/core/files/lib/facets/core/time/self/stamp_rb.html +0 -100
- data/doc/api/core/files/lib/facets/core/time/stamp_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/time/to_date_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/to_s_rb.html +0 -96
- data/doc/api/core/files/lib/facets/core/time/to_time_rb.html +0 -92
- data/doc/api/core/files/lib/facets/core/unboundmethod/name_rb.html +0 -92
- data/doc/api/core/fr_class_index.html +0 -81
- data/doc/api/core/fr_file_index.html +0 -521
- data/doc/api/core/fr_method_index.html +0 -559
- data/doc/api/core/index.html +0 -26
- data/doc/api/core/rdoc-style.css +0 -175
- data/doc/api/more/classes/Annotation.html +0 -258
- data/doc/api/more/classes/Array.html +0 -363
- data/doc/api/more/classes/Aspect.html +0 -159
- data/doc/api/more/classes/Aspects.html +0 -240
- data/doc/api/more/classes/Aspects/ClassMethods.html +0 -254
- data/doc/api/more/classes/Association.html +0 -289
- data/doc/api/more/classes/BBCode.html +0 -531
- data/doc/api/more/classes/BasicObject.html +0 -281
- data/doc/api/more/classes/BasicObject/Self.html +0 -143
- data/doc/api/more/classes/BinaryReader.html +0 -535
- data/doc/api/more/classes/BinaryReader/ByteOrder.html +0 -225
- data/doc/api/more/classes/BuilderObject.html +0 -248
- data/doc/api/more/classes/Class.html +0 -200
- data/doc/api/more/classes/Client.html +0 -1251
- data/doc/api/more/classes/Cloneable.html +0 -133
- data/doc/api/more/classes/Console.html +0 -105
- data/doc/api/more/classes/Console/ANSICode.html +0 -488
- data/doc/api/more/classes/Console/Command.html +0 -286
- data/doc/api/more/classes/Console/ProgressBar.html +0 -640
- data/doc/api/more/classes/Coroutine.html +0 -284
- data/doc/api/more/classes/Crypt.html +0 -270
- data/doc/api/more/classes/DebugSocket.html +0 -242
- data/doc/api/more/classes/Dictionary.html +0 -974
- data/doc/api/more/classes/Downloader.html +0 -515
- data/doc/api/more/classes/Downloader/Checksum.html +0 -96
- data/doc/api/more/classes/Downloader/Mirror.html +0 -134
- data/doc/api/more/classes/Elementor.html +0 -202
- data/doc/api/more/classes/Enumerable.html +0 -86
- data/doc/api/more/classes/EnumerablePass.html +0 -217
- data/doc/api/more/classes/Expirable.html +0 -197
- data/doc/api/more/classes/FalseClass.html +0 -119
- data/doc/api/more/classes/FileList.html +0 -971
- data/doc/api/more/classes/Float.html +0 -141
- data/doc/api/more/classes/FloatString.html +0 -413
- data/doc/api/more/classes/Functor.html +0 -224
- data/doc/api/more/classes/HTMLBuilder.html +0 -132
- data/doc/api/more/classes/HTMLHelper.html +0 -189
- data/doc/api/more/classes/HTTP.html +0 -154
- data/doc/api/more/classes/HTTP/BadResponseError.html +0 -94
- data/doc/api/more/classes/HTTP/Error.html +0 -96
- data/doc/api/more/classes/HTTP/Message.html +0 -633
- data/doc/api/more/classes/HTTP/Message/Body.html +0 -299
- data/doc/api/more/classes/HTTP/Message/Headers.html +0 -641
- data/doc/api/more/classes/HTTP/Status.html +0 -148
- data/doc/api/more/classes/HTTPAccess.html +0 -115
- data/doc/api/more/classes/Hash.html +0 -257
- data/doc/api/more/classes/HashBuilder.html +0 -216
- data/doc/api/more/classes/Heap.html +0 -535
- data/doc/api/more/classes/Heap/EmptyHeapException.html +0 -92
- data/doc/api/more/classes/Heap/Max.html +0 -133
- data/doc/api/more/classes/Heap/Min.html +0 -133
- data/doc/api/more/classes/IORedirect.html +0 -224
- data/doc/api/more/classes/Integer.html +0 -299
- data/doc/api/more/classes/Interval.html +0 -853
- data/doc/api/more/classes/InvalidNackError.html +0 -117
- data/doc/api/more/classes/JSON.html +0 -410
- data/doc/api/more/classes/JSON/Parser.html +0 -374
- data/doc/api/more/classes/JSON/State.html +0 -280
- data/doc/api/more/classes/Kernel.html +0 -400
- data/doc/api/more/classes/LRUCache.html +0 -461
- data/doc/api/more/classes/LRUCache/Item.html +0 -114
- data/doc/api/more/classes/LRUCache/Sentinel.html +0 -102
- data/doc/api/more/classes/Lazy.html +0 -96
- data/doc/api/more/classes/Lazy/Future.html +0 -100
- data/doc/api/more/classes/Lazy/Promise.html +0 -114
- data/doc/api/more/classes/Lazy/PromiseSafe.html +0 -99
- data/doc/api/more/classes/Lisp.html +0 -846
- data/doc/api/more/classes/Lisp/DottedPair.html +0 -289
- data/doc/api/more/classes/Lisp/Format.html +0 -147
- data/doc/api/more/classes/Math.html +0 -110
- data/doc/api/more/classes/Math/Constants.html +0 -691
- data/doc/api/more/classes/Math/Constants/CGS.html +0 -584
- data/doc/api/more/classes/Method.html +0 -170
- data/doc/api/more/classes/Method/Probe.html +0 -267
- data/doc/api/more/classes/Mock.html +0 -276
- data/doc/api/more/classes/Module.html +0 -599
- data/doc/api/more/classes/Multiton.html +0 -256
- data/doc/api/more/classes/NackClass.html +0 -245
- data/doc/api/more/classes/NilClass.html +0 -238
- data/doc/api/more/classes/NullClass.html +0 -202
- data/doc/api/more/classes/Numeric.html +0 -1104
- data/doc/api/more/classes/ORMSupport.html +0 -357
- data/doc/api/more/classes/Object.html +0 -328
- data/doc/api/more/classes/OpenCascade.html +0 -230
- data/doc/api/more/classes/OpenObject.html +0 -552
- data/doc/api/more/classes/PQueue.html +0 -471
- data/doc/api/more/classes/PathList.html +0 -162
- data/doc/api/more/classes/PathList/Finder.html +0 -137
- data/doc/api/more/classes/Pool.html +0 -207
- data/doc/api/more/classes/Proc.html +0 -140
- data/doc/api/more/classes/PromoteSelf.html +0 -138
- data/doc/api/more/classes/Quaternion.html +0 -1497
- data/doc/api/more/classes/REXMLBuilder.html +0 -357
- data/doc/api/more/classes/REXMLBuilder/REXMLUtil.html +0 -396
- data/doc/api/more/classes/Recorder.html +0 -208
- data/doc/api/more/classes/Reference.html +0 -201
- data/doc/api/more/classes/RubyOneLiners.html +0 -139
- data/doc/api/more/classes/RubyTals.html +0 -316
- data/doc/api/more/classes/SSLSocketWrap.html +0 -410
- data/doc/api/more/classes/Semaphore.html +0 -264
- data/doc/api/more/classes/SimpleStringIO.html +0 -139
- data/doc/api/more/classes/Snapshot.html +0 -191
- data/doc/api/more/classes/StateMachine.html +0 -248
- data/doc/api/more/classes/StateParser.html +0 -276
- data/doc/api/more/classes/StateParser/Constants.html +0 -109
- data/doc/api/more/classes/StateParser/Marker.html +0 -269
- data/doc/api/more/classes/StateParser/State.html +0 -448
- data/doc/api/more/classes/StaticHash.html +0 -144
- data/doc/api/more/classes/String.html +0 -300
- data/doc/api/more/classes/Struct.html +0 -134
- data/doc/api/more/classes/Symbol.html +0 -118
- data/doc/api/more/classes/SyncArray.html +0 -131
- data/doc/api/more/classes/SyncHash.html +0 -135
- data/doc/api/more/classes/SyncHash/Delegator.html +0 -213
- data/doc/api/more/classes/SyncHash/Inheritor.html +0 -213
- data/doc/api/more/classes/System.html +0 -1055
- data/doc/api/more/classes/TSort.html +0 -123
- data/doc/api/more/classes/TagIterator.html +0 -706
- data/doc/api/more/classes/Task.html +0 -237
- data/doc/api/more/classes/Task/Graph.html +0 -165
- data/doc/api/more/classes/Taskable.html +0 -300
- data/doc/api/more/classes/Time.html +0 -746
- data/doc/api/more/classes/Timer.html +0 -471
- data/doc/api/more/classes/Timer/Dummy.html +0 -141
- data/doc/api/more/classes/TracePoint.html +0 -456
- data/doc/api/more/classes/TrueClass.html +0 -118
- data/doc/api/more/classes/Tuple.html +0 -907
- data/doc/api/more/classes/TypeCastException.html +0 -163
- data/doc/api/more/classes/Uninheritable.html +0 -130
- data/doc/api/more/classes/Units.html +0 -191
- data/doc/api/more/classes/Units/Config.html +0 -120
- data/doc/api/more/classes/Units/Converter.html +0 -808
- data/doc/api/more/classes/Units/Converter/ExchangeRate.html +0 -155
- data/doc/api/more/classes/Units/Converter/ExchangeRate/CachedXMethods.html +0 -143
- data/doc/api/more/classes/Units/Converter/ExchangeRate/XMethods.html +0 -197
- data/doc/api/more/classes/Units/Unit.html +0 -434
- data/doc/api/more/classes/Units/Value.html +0 -331
- data/doc/api/more/classes/ValueHolder.html +0 -167
- data/doc/api/more/classes/Web.html +0 -103
- data/doc/api/more/classes/Web/Cookie.html +0 -560
- data/doc/api/more/classes/Web/CookieManager.html +0 -567
- data/doc/api/more/classes/Web/CookieManager/Error.html +0 -96
- data/doc/api/more/classes/Web/CookieManager/ErrorOverrideOK.html +0 -94
- data/doc/api/more/classes/Web/CookieManager/NoDotError.html +0 -94
- data/doc/api/more/classes/Web/CookieManager/SpecialError.html +0 -94
- data/doc/api/more/classes/Web/CookieUtils.html +0 -179
- data/doc/api/more/classes/XMLBuilder.html +0 -132
- data/doc/api/more/classes/XMLHelper.html +0 -428
- data/doc/api/more/classes/XOXO.html +0 -251
- data/doc/api/more/classes/YAMLStruct.html +0 -166
- data/doc/api/more/created.rid +0 -1
- data/doc/api/more/files/COPYING.html +0 -517
- data/doc/api/more/files/README.html +0 -389
- data/doc/api/more/files/lib/facets/more/annattr_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/annotation_rb.html +0 -117
- data/doc/api/more/files/lib/facets/more/ansicode_rb.html +0 -128
- data/doc/api/more/files/lib/facets/more/aspects_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/association_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/basicobject_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/bbcode_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/binaryreader_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/bitmask_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/blankslate_rb.html +0 -113
- data/doc/api/more/files/lib/facets/more/builderobject_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/bytes_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/classmethods_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/cloneable_rb.html +0 -132
- data/doc/api/more/files/lib/facets/more/command_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/cookie_rb.html +0 -136
- data/doc/api/more/files/lib/facets/more/coroutine_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/crypt_rb.html +0 -146
- data/doc/api/more/files/lib/facets/more/dictionary_rb.html +0 -123
- data/doc/api/more/files/lib/facets/more/downloader_rb.html +0 -124
- data/doc/api/more/files/lib/facets/more/elementor_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/enumerablepass_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/expirable_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/filelist_rb.html +0 -128
- data/doc/api/more/files/lib/facets/more/floatstring_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/functor_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/hashbuilder_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/heap_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/htmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/htmlhelper_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/http_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/httpaccess_rb.html +0 -137
- data/doc/api/more/files/lib/facets/more/inheritor_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/interval_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/ioredirect_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/json_rb.html +0 -141
- data/doc/api/more/files/lib/facets/more/lazy_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/lisp_format_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/lisp_rb.html +0 -119
- data/doc/api/more/files/lib/facets/more/lrucache_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/mathconstants_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/methodprobe_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/mock_rb.html +0 -208
- data/doc/api/more/files/lib/facets/more/multipliers_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/multiton_rb.html +0 -114
- data/doc/api/more/files/lib/facets/more/nackclass_rb.html +0 -151
- data/doc/api/more/files/lib/facets/more/nilcomparable_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/nullclass_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/one_rb.html +0 -158
- data/doc/api/more/files/lib/facets/more/opencascade_rb.html +0 -129
- data/doc/api/more/files/lib/facets/more/openobject_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/orderedhash_rb.html +0 -113
- data/doc/api/more/files/lib/facets/more/ormsupport_rb.html +0 -125
- data/doc/api/more/files/lib/facets/more/overload_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/paramix_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/pathlist_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/pool_rb.html +0 -120
- data/doc/api/more/files/lib/facets/more/pqueue_rb.html +0 -122
- data/doc/api/more/files/lib/facets/more/preinitialize_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/progressbar_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/promoteself_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/quaternion_rb.html +0 -150
- data/doc/api/more/files/lib/facets/more/recorder_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/reference_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/rexmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/rtals_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/semaphore_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/snapshot_rb.html +0 -121
- data/doc/api/more/files/lib/facets/more/stateparser_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/statichash_rb.html +0 -133
- data/doc/api/more/files/lib/facets/more/syncarray_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/synchash_rb.html +0 -115
- data/doc/api/more/files/lib/facets/more/system_rb.html +0 -123
- data/doc/api/more/files/lib/facets/more/tagiterator_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/taskable_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/timer_rb.html +0 -127
- data/doc/api/more/files/lib/facets/more/times_rb.html +0 -127
- data/doc/api/more/files/lib/facets/more/tracepoint_rb.html +0 -131
- data/doc/api/more/files/lib/facets/more/tuple_rb.html +0 -122
- data/doc/api/more/files/lib/facets/more/typecast_rb.html +0 -133
- data/doc/api/more/files/lib/facets/more/uninheritable_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/units_rb.html +0 -118
- data/doc/api/more/files/lib/facets/more/xmlbuilder_rb.html +0 -116
- data/doc/api/more/files/lib/facets/more/xmlhelper_rb.html +0 -111
- data/doc/api/more/files/lib/facets/more/xoxo_rb.html +0 -125
- data/doc/api/more/files/lib/facets/more/yamlstruct_rb.html +0 -123
- data/doc/api/more/fr_class_index.html +0 -196
- data/doc/api/more/fr_file_index.html +0 -133
- data/doc/api/more/fr_method_index.html +0 -1284
- data/doc/api/more/index.html +0 -26
- data/doc/api/more/rdoc-style.css +0 -175
- data/doc/web/documentation.html +0 -174
- data/doc/web/images/abc.png +0 -0
- data/doc/web/images/abc1.png +0 -0
- data/doc/web/images/apple_core.jpg +0 -0
- data/doc/web/images/apples3.jpg +0 -0
- data/doc/web/images/core.jpg +0 -0
- data/doc/web/images/favicon.ico +0 -0
- data/doc/web/images/gray.jpg +0 -0
- data/doc/web/images/ruby-lg.png +0 -0
- data/doc/web/images/ruby.gif +0 -0
- data/doc/web/images/three_apples.jpg +0 -0
- data/doc/web/images/yellow_fade.jpg +0 -0
- data/doc/web/images/yellow_fade2.jpg +0 -0
- data/doc/web/index.html +0 -224
- data/doc/web/style.css +0 -153
- data/lib/facet/blankslate.rb +0 -1
- data/lib/facet/hash/symoblize_keys.rb +0 -1
- data/lib/facet/kernel/generate_method_name.rb +0 -1
- data/lib/facet/module/generate_instance_method_name.rb +0 -1
- data/lib/facets/core/hash/symoblize_keys.rb +0 -2
- data/lib/facets/core/kernel/generate_method_name.rb +0 -39
- data/lib/facets/core/module/generate_instance_method_name.rb +0 -47
- data/lib/facets/more/blankslate.rb +0 -7
- data/proj/calibre/ProjectInfo.annotation +0 -46
- data/proj/calibre/ProjectInfo.ansicode +0 -33
- data/proj/calibre/ProjectInfo.asociation +0 -34
- data/proj/calibre/ProjectInfo.basicobject +0 -36
- data/proj/calibre/ProjectInfo.bbcode +0 -34
- data/proj/calibre/ProjectInfo.binaryreader +0 -35
- data/proj/calibre/ProjectInfo.bitmask +0 -33
- data/proj/calibre/ProjectInfo.classinherit +0 -36
- data/proj/calibre/ProjectInfo.classmethods +0 -36
- data/proj/calibre/ProjectInfo.cloneable +0 -33
- data/proj/calibre/ProjectInfo.consoleapp +0 -35
- data/proj/calibre/ProjectInfo.coroutine +0 -37
- data/proj/calibre/ProjectInfo.crypt +0 -33
- data/proj/calibre/ProjectInfo.dictionary +0 -40
- data/proj/calibre/ProjectInfo.downloader +0 -39
- data/proj/calibre/ProjectInfo.enumerablepass +0 -35
- data/proj/calibre/ProjectInfo.expirable +0 -37
- data/proj/calibre/ProjectInfo.floatstring +0 -35
- data/proj/calibre/ProjectInfo.functor +0 -40
- data/proj/calibre/ProjectInfo.heap +0 -33
- data/proj/calibre/ProjectInfo.inheritor +0 -36
- data/proj/calibre/ProjectInfo.interval +0 -36
- data/proj/calibre/ProjectInfo.lisp +0 -38
- data/proj/calibre/ProjectInfo.lrucache +0 -34
- data/proj/calibre/ProjectInfo.mathconstants +0 -41
- data/proj/calibre/ProjectInfo.methodprobe +0 -38
- data/proj/calibre/ProjectInfo.mock +0 -34
- data/proj/calibre/ProjectInfo.multiton +0 -36
- data/proj/calibre/ProjectInfo.nackclass +0 -33
- data/proj/calibre/ProjectInfo.nilcomparable +0 -35
- data/proj/calibre/ProjectInfo.nullclass +0 -35
- data/proj/calibre/ProjectInfo.one +0 -37
- data/proj/calibre/ProjectInfo.openobject +0 -39
- data/proj/calibre/ProjectInfo.paramix +0 -38
- data/proj/calibre/ProjectInfo.pool +0 -33
- data/proj/calibre/ProjectInfo.progressbar +0 -37
- data/proj/calibre/ProjectInfo.reference +0 -36
- data/proj/calibre/ProjectInfo.semaphore +0 -36
- data/proj/calibre/ProjectInfo.stateparser +0 -39
- data/proj/calibre/ProjectInfo.statichash +0 -33
- data/proj/calibre/ProjectInfo.system +0 -34
- data/proj/calibre/ProjectInfo.tagiterator +0 -36
- data/proj/calibre/ProjectInfo.timer +0 -35
- data/proj/calibre/ProjectInfo.tracepoint +0 -37
- data/proj/calibre/ProjectInfo.tuple +0 -36
- data/proj/calibre/ProjectInfo.uniheritable +0 -34
- data/proj/calibre/ProjectInfo.units +0 -34
- data/proj/calibre/ProjectInfo.yamlstruct +0 -34
- data/proj/info +0 -117
- data/proj/metadata +0 -36
- data/proj/tasks/calibre.rb +0 -15
- data/snip/ProjectInfo +0 -115
- data/snip/README +0 -13
- data/snip/TODO +0 -73
- data/snip/autorequire.rb +0 -83
- data/snip/core/array/at_rand.rb +0 -95
- data/snip/core/array/each_slice.rb +0 -23
- data/snip/core/array/pick_values.rb +0 -32
- data/snip/core/array/rand_indexes.rb +0 -33
- data/snip/core/binding/class.rb +0 -11
- data/snip/core/binding/delegate-binding.rb +0 -19
- data/snip/core/binding/delegate.rb +0 -15
- data/snip/core/binding/proc.rb +0 -6
- data/snip/core/class/to_module.rb +0 -3
- data/snip/core/enumerable/op_fetch.rb +0 -30
- data/snip/core/fileutils/nl_convert.rb +0 -133
- data/snip/core/io/expect.rb +0 -127
- data/snip/core/kernel/__clone__.rb +0 -4
- data/snip/core/kernel/__dup__.rb +0 -4
- data/snip/core/kernel/call_line.rb +0 -15
- data/snip/core/kernel/does.rb +0 -7
- data/snip/core/kernel/message.rb +0 -6
- data/snip/core/kernel/query.rb +0 -15
- data/snip/core/kernel/taint.rb +0 -10
- data/snip/core/logger/clean_logger.rb +0 -10
- data/snip/core/module/attr-old.rb +0 -308
- data/snip/core/module/attr.rb +0 -98
- data/snip/core/module/attr_xxx.rb +0 -22
- data/snip/core/module/by_regexp.rb +0 -21
- data/snip/core/module/cast.rb +0 -64
- data/snip/core/module/class_attribute_accessors.rb +0 -57
- data/snip/core/module/inherit.rb +0 -99
- data/snip/core/module/inherit0.rb +0 -59
- data/snip/core/module/let.rb +0 -51
- data/snip/core/module/meta_attr.rb +0 -60
- data/snip/core/module/module_attribute_accessors.rb +0 -57
- data/snip/core/module/permissions.rb +0 -32
- data/snip/core/module/preserved.rb +0 -108
- data/snip/core/module/sattr_accessor.rb +0 -1
- data/snip/core/module/sattr_reader.rb +0 -1
- data/snip/core/module/sattr_setter.rb +0 -1
- data/snip/core/module/sattr_tester.rb +0 -1
- data/snip/core/module/sattr_writer.rb +0 -1
- data/snip/core/module/tc_attr.rb +0 -107
- data/snip/core/module/to_module.rb +0 -37
- data/snip/core/module/version.rb +0 -23
- data/snip/core/string/frequency.rb +0 -40
- data/snip/core/string/op_add.rb +0 -24
- data/snip/core/string/op_div.rb +0 -15
- data/snip/core/string/pred.rb +0 -217
- data/snip/core/string/probability.rb +0 -35
- data/snip/core/string/to_arr.rb +0 -57
- data/snip/core/string/to_ary.rb +0 -12
- data/snip/core/string/word_wrap.rb +0 -62
- data/snip/more/actionplan.rb +0 -21
- data/snip/more/autoarray.rb +0 -29
- data/snip/more/cache.rb +0 -189
- data/snip/more/capsule2.rb +0 -152
- data/snip/more/class_inheritable_attributes.rb +0 -120
- data/snip/more/classinherit.rb +0 -198
- data/snip/more/clean.rb +0 -35
- data/snip/more/codepack.rb +0 -64
- data/snip/more/commandrunner.rb +0 -101
- data/snip/more/conditionals.rb +0 -106
- data/snip/more/contracts.rb +0 -37
- data/snip/more/daemon.rb +0 -70
- data/snip/more/datetime.rb +0 -42
- data/snip/more/detach.rb +0 -423
- data/snip/more/enumtype.rb +0 -115
- data/snip/more/fixnum_const.rb +0 -55
- data/snip/more/function.rb +0 -278
- data/snip/more/hookse.rb +0 -107
- data/snip/more/indexable.rb +0 -85
- data/snip/more/infinity.rb +0 -123
- data/snip/more/ioreactor.rb +0 -671
- data/snip/more/knowself.rb +0 -42
- data/snip/more/logger_sing.rb +0 -207
- data/snip/more/must.rb +0 -37
- data/snip/more/openproxy.rb +0 -245
- data/snip/more/ostructable.rb +0 -212
- data/snip/more/pairhash.rb +0 -55
- data/snip/more/pathname.rb +0 -1309
- data/snip/more/prereq.rb +0 -36
- data/snip/more/print_exception.rb +0 -35
- data/snip/more/rand.rb +0 -412
- data/snip/more/range.rb +0 -383
- data/snip/more/sanitize.rb +0 -48
- data/snip/more/service.rb +0 -266
- data/snip/more/superstruct.rb +0 -735
- data/snip/more/tag.rb +0 -27
- data/snip/more/testfacility.rb +0 -80
- data/snip/more/timer.rb +0 -164
- data/snip/more/toplevel.rb +0 -76
- data/snip/more/type.rb +0 -232
- data/snip/more/vars.rb +0 -94
- data/snip/more/version.rb +0 -245
- data/snip/more/world.rb +0 -53
- data/snip/reference/sys.rb +0 -186
- data/snip/reference/utils.rb +0 -518
- data/test/lib/facets/core/kernel/test_generate_method_name.rb +0 -26
- data/test/lib/facets/core/module/test_generate_instance_method_name.rb +0 -33
@@ -1,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: Logger</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 />Logger</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/logger/format_rb.html">lib/facets/core/logger/format.rb</a>
|
61
|
-
</td>
|
62
|
-
</tr>
|
63
|
-
<tr>
|
64
|
-
<td>Parent:</td>
|
65
|
-
<td>
|
66
|
-
<a href="Object.html">
|
67
|
-
Object
|
68
|
-
</a>
|
69
|
-
</td>
|
70
|
-
</tr>
|
71
|
-
</table>
|
72
|
-
</td>
|
73
|
-
</tr>
|
74
|
-
</table>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
<div id="content">
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<div class="sectiontitle">Methods</div>
|
84
|
-
<ul>
|
85
|
-
<li><a href="#M000247">format</a></li>
|
86
|
-
<li><a href="#M000248">format_message</a></li>
|
87
|
-
</ul>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<div class="sectiontitle">Private Instance methods</div>
|
95
|
-
<div class="method">
|
96
|
-
<div class="title">
|
97
|
-
<a name="M000247"></a><b>format</b>(&format_proc)
|
98
|
-
</div>
|
99
|
-
<div class="description">
|
100
|
-
<p>
|
101
|
-
Dictate the way in which this logger should format the messages it
|
102
|
-
displays. This method requires a block. The block should return formatted
|
103
|
-
strings given severity, timestamp, msg, progname.
|
104
|
-
</p>
|
105
|
-
<p>
|
106
|
-
Useless example:
|
107
|
-
</p>
|
108
|
-
<p>
|
109
|
-
logger = Logger.new logger.format do |severity, timestamp, msg, progname|
|
110
|
-
</p>
|
111
|
-
<pre>
|
112
|
-
"#{progname}@#{timestamp} - #{severity}::#{msg}"
|
113
|
-
</pre>
|
114
|
-
<p>
|
115
|
-
end
|
116
|
-
</p>
|
117
|
-
</div>
|
118
|
-
<div class="sourcecode">
|
119
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000247_source')" id="l_M000247_source">show source</a> ]</p>
|
120
|
-
<div id="M000247_source" class="dyn-source">
|
121
|
-
<pre>
|
122
|
-
<span class="ruby-comment cmt"># File lib/facets/core/logger/format.rb, line 18</span>
|
123
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">format_proc</span>)
|
124
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">'block expected'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">format_proc</span>
|
125
|
-
<span class="ruby-ivar">@format_proc</span> = <span class="ruby-identifier">format_proc</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="M000248"></a><b>format_message</b>(*args)
|
134
|
-
</div>
|
135
|
-
<div class="description">
|
136
|
-
<p>
|
137
|
-
hackish use of *args, give me some love
|
138
|
-
</p>
|
139
|
-
</div>
|
140
|
-
<div class="sourcecode">
|
141
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000248_source')" id="l_M000248_source">show source</a> ]</p>
|
142
|
-
<div id="M000248_source" class="dyn-source">
|
143
|
-
<pre>
|
144
|
-
<span class="ruby-comment cmt"># File lib/facets/core/logger/format.rb, line 24</span>
|
145
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format_message</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
146
|
-
<span class="ruby-ivar">@format_proc</span> <span class="ruby-operator">?</span> <span class="ruby-ivar">@format_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-operator">:</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</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,195 +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: MatchData</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 />MatchData</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/matchdata/matchtree_rb.html">lib/facets/core/matchdata/matchtree.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/matchdata/match_rb.html">lib/facets/core/matchdata/match.rb</a>
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
<tr>
|
65
|
-
<td>Parent:</td>
|
66
|
-
<td>
|
67
|
-
<a href="Object.html">
|
68
|
-
Object
|
69
|
-
</a>
|
70
|
-
</td>
|
71
|
-
</tr>
|
72
|
-
</table>
|
73
|
-
</td>
|
74
|
-
</tr>
|
75
|
-
</table>
|
76
|
-
<!-- banner header -->
|
77
|
-
|
78
|
-
<div id="bodyContent">
|
79
|
-
<div id="content">
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<div class="sectiontitle">Methods</div>
|
85
|
-
<ul>
|
86
|
-
<li><a href="#M000147">match</a></li>
|
87
|
-
<li><a href="#M000145">matchset</a></li>
|
88
|
-
<li><a href="#M000146">matchtree</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="M000147"></a><b>match</b>()
|
100
|
-
</div>
|
101
|
-
<div class="description">
|
102
|
-
<p>
|
103
|
-
Return the primary match string. This is equivalent to +md[0]+.
|
104
|
-
</p>
|
105
|
-
<pre>
|
106
|
-
md = /123/.match "123456"
|
107
|
-
md.match #=> "123"
|
108
|
-
</pre>
|
109
|
-
</div>
|
110
|
-
<div class="sourcecode">
|
111
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000147_source')" id="l_M000147_source">show source</a> ]</p>
|
112
|
-
<div id="M000147_source" class="dyn-source">
|
113
|
-
<pre>
|
114
|
-
<span class="ruby-comment cmt"># File lib/facets/core/matchdata/match.rb, line 9</span>
|
115
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">match</span>
|
116
|
-
<span class="ruby-keyword kw">self</span>[<span class="ruby-value">0</span>]
|
117
|
-
<span class="ruby-keyword kw">end</span>
|
118
|
-
</pre>
|
119
|
-
</div>
|
120
|
-
</div>
|
121
|
-
</div>
|
122
|
-
<div class="method">
|
123
|
-
<div class="title">
|
124
|
-
<a name="M000145"></a><b>matchset</b>()
|
125
|
-
</div>
|
126
|
-
<div class="description">
|
127
|
-
<p>
|
128
|
-
Returns [ pre_match, matchtree, post_match ]. (see matchtree)
|
129
|
-
</p>
|
130
|
-
<pre>
|
131
|
-
md = /(bb)(cc(dd))(ee)/.match "XXaabbccddeeffXX"
|
132
|
-
md.to_a #=> ["XXaabbccddeeffXX", "bb", "ccdd", "dd", "ee"]
|
133
|
-
md.matchset #=> ["XXaa", [["bb"], ["cc", ["dd"]], "ee"], "ffXX"]
|
134
|
-
</pre>
|
135
|
-
</div>
|
136
|
-
<div class="sourcecode">
|
137
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000145_source')" id="l_M000145_source">show source</a> ]</p>
|
138
|
-
<div id="M000145_source" class="dyn-source">
|
139
|
-
<pre>
|
140
|
-
<span class="ruby-comment cmt"># File lib/facets/core/matchdata/matchtree.rb, line 10</span>
|
141
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">matchset</span>
|
142
|
-
[<span class="ruby-identifier">pre_match</span>, <span class="ruby-identifier">matchtree</span>, <span class="ruby-identifier">post_match</span>]
|
143
|
-
<span class="ruby-keyword kw">end</span>
|
144
|
-
</pre>
|
145
|
-
</div>
|
146
|
-
</div>
|
147
|
-
</div>
|
148
|
-
<div class="method">
|
149
|
-
<div class="title">
|
150
|
-
<a name="M000146"></a><b>matchtree</b>(index=0)
|
151
|
-
</div>
|
152
|
-
<div class="description">
|
153
|
-
<p>
|
154
|
-
An alternate to to_a which returns the matches in order corresponding with
|
155
|
-
the regular expression.
|
156
|
-
</p>
|
157
|
-
<pre>
|
158
|
-
md = /(bb)(cc(dd))(ee)/.match "XXaabbccddeeffXX"
|
159
|
-
md.to_a #=> ["XXaabbccddeeffXX", "bb", "ccdd", "dd", "ee"]
|
160
|
-
md.matchtree #=> [["bb"], ["cc", ["dd"]], "ee"]
|
161
|
-
</pre>
|
162
|
-
</div>
|
163
|
-
<div class="sourcecode">
|
164
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000146_source')" id="l_M000146_source">show source</a> ]</p>
|
165
|
-
<div id="M000146_source" class="dyn-source">
|
166
|
-
<pre>
|
167
|
-
<span class="ruby-comment cmt"># File lib/facets/core/matchdata/matchtree.rb, line 21</span>
|
168
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">matchtree</span>(<span class="ruby-identifier">index</span>=<span class="ruby-value">0</span>)
|
169
|
-
<span class="ruby-identifier">ret</span>=[]
|
170
|
-
<span class="ruby-identifier">b</span>, <span class="ruby-identifier">e</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-identifier">index</span>), <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">end</span>(<span class="ruby-identifier">index</span>)
|
171
|
-
<span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">index</span><span class="ruby-operator">+=</span><span class="ruby-value">1</span>)<span class="ruby-operator"><=</span><span class="ruby-identifier">length</span>
|
172
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span><span class="ruby-operator">==</span><span class="ruby-identifier">length</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">bi</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">begin</span>(<span class="ruby-identifier">index</span>))<span class="ruby-operator">>=</span><span class="ruby-identifier">e</span>
|
173
|
-
<span class="ruby-comment cmt"># we are finished, if something is left, then add it</span>
|
174
|
-
<span class="ruby-identifier">ret</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">string</span>[<span class="ruby-identifier">b</span>, <span class="ruby-identifier">e</span><span class="ruby-operator">-</span><span class="ruby-identifier">b</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span><span class="ruby-operator">></span><span class="ruby-identifier">b</span>
|
175
|
-
<span class="ruby-keyword kw">break</span>
|
176
|
-
<span class="ruby-keyword kw">else</span>
|
177
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bi</span><span class="ruby-operator">>=</span><span class="ruby-identifier">b</span>
|
178
|
-
<span class="ruby-identifier">ret</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">string</span>[<span class="ruby-identifier">b</span>, <span class="ruby-identifier">bi</span><span class="ruby-operator">-</span><span class="ruby-identifier">b</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">bi</span><span class="ruby-operator">></span><span class="ruby-identifier">b</span>
|
179
|
-
<span class="ruby-identifier">ret</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">matchtree</span>(<span class="ruby-identifier">index</span>)
|
180
|
-
<span class="ruby-identifier">b</span>=<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">end</span>(<span class="ruby-identifier">index</span>)
|
181
|
-
<span class="ruby-keyword kw">end</span>
|
182
|
-
<span class="ruby-keyword kw">end</span>
|
183
|
-
<span class="ruby-keyword kw">end</span>
|
184
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span>
|
185
|
-
<span class="ruby-keyword kw">end</span>
|
186
|
-
</pre>
|
187
|
-
</div>
|
188
|
-
</div>
|
189
|
-
</div>
|
190
|
-
</div>
|
191
|
-
|
192
|
-
</div>
|
193
|
-
|
194
|
-
</body>
|
195
|
-
</html>
|
@@ -1,1812 +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: Module</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 />Module</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/kernel/method_rb.html">lib/facets/core/kernel/method.rb</a>
|
61
|
-
<a href="../files/lib/facets/core/module/redefine_method_rb.html">lib/facets/core/module/redefine_method.rb</a>
|
62
|
-
<a href="../files/lib/facets/core/module/redirect_method_rb.html">lib/facets/core/module/redirect_method.rb</a>
|
63
|
-
<a href="../files/lib/facets/core/module/initializer_rb.html">lib/facets/core/module/initializer.rb</a>
|
64
|
-
<a href="../files/lib/facets/core/module/shadow_all_rb.html">lib/facets/core/module/shadow_all.rb</a>
|
65
|
-
<a href="../files/lib/facets/core/module/is_rb.html">lib/facets/core/module/is.rb</a>
|
66
|
-
<a href="../files/lib/facets/core/module/modspace_rb.html">lib/facets/core/module/modspace.rb</a>
|
67
|
-
<a href="../files/lib/facets/core/module/instance_methods_rb.html">lib/facets/core/module/instance_methods.rb</a>
|
68
|
-
<a href="../files/lib/facets/core/module/attr_tester_rb.html">lib/facets/core/module/attr_tester.rb</a>
|
69
|
-
<a href="../files/lib/facets/core/module/integrate_rb.html">lib/facets/core/module/integrate.rb</a>
|
70
|
-
<a href="../files/lib/facets/core/module/basename_rb.html">lib/facets/core/module/basename.rb</a>
|
71
|
-
<a href="../files/lib/facets/core/module/generate_instance_method_name_rb.html">lib/facets/core/module/generate_instance_method_name.rb</a>
|
72
|
-
<a href="../files/lib/facets/core/module/redirect_rb.html">lib/facets/core/module/redirect.rb</a>
|
73
|
-
<a href="../files/lib/facets/core/module/shadow_method_rb.html">lib/facets/core/module/shadow_method.rb</a>
|
74
|
-
<a href="../files/lib/facets/core/module/alias_module_function_rb.html">lib/facets/core/module/alias_module_function.rb</a>
|
75
|
-
<a href="../files/lib/facets/core/module/namespace_rb.html">lib/facets/core/module/namespace.rb</a>
|
76
|
-
<a href="../files/lib/facets/core/module/abstract_rb.html">lib/facets/core/module/abstract.rb</a>
|
77
|
-
<a href="../files/lib/facets/core/module/this_rb.html">lib/facets/core/module/this.rb</a>
|
78
|
-
<a href="../files/lib/facets/core/module/nesting_rb.html">lib/facets/core/module/nesting.rb</a>
|
79
|
-
<a href="../files/lib/facets/core/module/wrap_method_rb.html">lib/facets/core/module/wrap_method.rb</a>
|
80
|
-
<a href="../files/lib/facets/core/module/class_rb.html">lib/facets/core/module/class.rb</a>
|
81
|
-
<a href="../files/lib/facets/core/module/ancestor_rb.html">lib/facets/core/module/ancestor.rb</a>
|
82
|
-
<a href="../files/lib/facets/core/module/include_as_rb.html">lib/facets/core/module/include_as.rb</a>
|
83
|
-
<a href="../files/lib/facets/core/module/rename_method_rb.html">lib/facets/core/module/rename_method.rb</a>
|
84
|
-
<a href="../files/lib/facets/core/module/attr_setter_rb.html">lib/facets/core/module/attr_setter.rb</a>
|
85
|
-
<a href="../files/lib/facets/core/module/rename_rb.html">lib/facets/core/module/rename.rb</a>
|
86
|
-
<a href="../files/lib/facets/core/module/dirname_rb.html">lib/facets/core/module/dirname.rb</a>
|
87
|
-
<a href="../files/lib/facets/core/module/attr_rb.html">lib/facets/core/module/attr.rb</a>
|
88
|
-
<a href="../files/lib/facets/core/module/remove_rb.html">lib/facets/core/module/remove.rb</a>
|
89
|
-
<a href="../files/lib/facets/core/module/sort_on_rb.html">lib/facets/core/module/sort_on.rb</a>
|
90
|
-
<a href="../files/lib/facets/core/module/nodef_rb.html">lib/facets/core/module/nodef.rb</a>
|
91
|
-
<a href="../files/lib/facets/core/module/equate_on_rb.html">lib/facets/core/module/equate_on.rb</a>
|
92
|
-
<a href="../files/lib/facets/core/module/redef_rb.html">lib/facets/core/module/redef.rb</a>
|
93
|
-
<a href="../files/lib/facets/core/module/clone_using_rb.html">lib/facets/core/module/clone_using.rb</a>
|
94
|
-
<a href="../files/lib/facets/core/module/by_name_rb.html">lib/facets/core/module/by_name.rb</a>
|
95
|
-
<a href="../files/lib/facets/core/module/memoize_rb.html">lib/facets/core/module/memoize.rb</a>
|
96
|
-
<a href="../files/lib/facets/core/module/wrap_rb.html">lib/facets/core/module/wrap.rb</a>
|
97
|
-
<a href="../files/lib/facets/core/module/revisal_rb.html">lib/facets/core/module/revisal.rb</a>
|
98
|
-
<a href="../files/lib/facets/core/module/on_included_rb.html">lib/facets/core/module/on_included.rb</a>
|
99
|
-
<a href="../files/lib/facets/core/module/attr_query_rb.html">lib/facets/core/module/attr_query.rb</a>
|
100
|
-
<a href="../files/lib/facets/core/module/attr_validator_rb.html">lib/facets/core/module/attr_validator.rb</a>
|
101
|
-
<a href="../files/lib/facets/core/module/class_extension_rb.html">lib/facets/core/module/class_extension.rb</a>
|
102
|
-
<a href="../files/lib/facets/core/module/alias_method_chain_rb.html">lib/facets/core/module/alias_method_chain.rb</a>
|
103
|
-
</td>
|
104
|
-
</tr>
|
105
|
-
<tr>
|
106
|
-
<td>Parent:</td>
|
107
|
-
<td>
|
108
|
-
<a href="Object.html">
|
109
|
-
Object
|
110
|
-
</a>
|
111
|
-
</td>
|
112
|
-
</tr>
|
113
|
-
</table>
|
114
|
-
</td>
|
115
|
-
</tr>
|
116
|
-
</table>
|
117
|
-
<!-- banner header -->
|
118
|
-
|
119
|
-
<div id="bodyContent">
|
120
|
-
<div id="content">
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<div class="sectiontitle">Methods</div>
|
126
|
-
<ul>
|
127
|
-
<li><a href="#M000164">abstract</a></li>
|
128
|
-
<li><a href="#M000194">alias_method_chain</a></li>
|
129
|
-
<li><a href="#M000162">alias_module_function</a></li>
|
130
|
-
<li><a href="#M000168">ancestor?</a></li>
|
131
|
-
<li><a href="#M000192">append_features</a></li>
|
132
|
-
<li><a href="#M000193">append_features</a></li>
|
133
|
-
<li><a href="#M000174">attr</a></li>
|
134
|
-
<li><a href="#M000171">attr_setter</a></li>
|
135
|
-
<li><a href="#M000156">attr_tester</a></li>
|
136
|
-
<li><a href="#M000189">attr_tester</a></li>
|
137
|
-
<li><a href="#M000190">attr_validator</a></li>
|
138
|
-
<li><a href="#M000158">basename</a></li>
|
139
|
-
<li><a href="#M000184">by_name</a></li>
|
140
|
-
<li><a href="#M000191">class_extension</a></li>
|
141
|
-
<li><a href="#M000182">clone_removing</a></li>
|
142
|
-
<li><a href="#M000181">clone_renaming</a></li>
|
143
|
-
<li><a href="#M000183">clone_using</a></li>
|
144
|
-
<li><a href="#M000176">compare_on</a></li>
|
145
|
-
<li><a href="#M000173">dirname</a></li>
|
146
|
-
<li><a href="#M000178">equate_on</a></li>
|
147
|
-
<li><a href="#M000159">generate_instance_method_name</a></li>
|
148
|
-
<li><a href="#M000169">include_as</a></li>
|
149
|
-
<li><a href="#M000151">initializer</a></li>
|
150
|
-
<li><a href="#M000148">instance_method!</a></li>
|
151
|
-
<li><a href="#M000155">instance_methods</a></li>
|
152
|
-
<li><a href="#M000157">integrate</a></li>
|
153
|
-
<li><a href="#M000153">is?</a></li>
|
154
|
-
<li><a href="#M000179">key_attributes</a></li>
|
155
|
-
<li><a href="#M000185">memoize</a></li>
|
156
|
-
<li><a href="#M000154">modspace</a></li>
|
157
|
-
<li><a href="#M000163">namespace</a></li>
|
158
|
-
<li><a href="#M000166">nesting</a></li>
|
159
|
-
<li><a href="#M000188">on_included</a></li>
|
160
|
-
<li><a href="#M000180">redef</a></li>
|
161
|
-
<li><a href="#M000149">redefine_method</a></li>
|
162
|
-
<li><a href="#M000160">redirect</a></li>
|
163
|
-
<li><a href="#M000150">redirect_method</a></li>
|
164
|
-
<li><a href="#M000172">rename</a></li>
|
165
|
-
<li><a href="#M000170">rename_method</a></li>
|
166
|
-
<li><a href="#M000187">revisal</a></li>
|
167
|
-
<li><a href="#M000152">shadow_all</a></li>
|
168
|
-
<li><a href="#M000161">shadow_method</a></li>
|
169
|
-
<li><a href="#M000177">sort_attributes</a></li>
|
170
|
-
<li><a href="#M000175">sort_on</a></li>
|
171
|
-
<li><a href="#M000165">this</a></li>
|
172
|
-
<li><a href="#M000186">wrap</a></li>
|
173
|
-
<li><a href="#M000167">wrap_method</a></li>
|
174
|
-
</ul>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<div class="sectiontitle">Constants</div>
|
180
|
-
<table border='0' cellpadding='5'>
|
181
|
-
<tr valign='top'>
|
182
|
-
<td class="attr-name">METHOD_TYPES</td>
|
183
|
-
<td>=</td>
|
184
|
-
<td class="attr-value">[ :inherited, :ancestors, :local, :public, :private, :protected, :all ]</td>
|
185
|
-
</tr>
|
186
|
-
</table>
|
187
|
-
|
188
|
-
|
189
|
-
<div class="sectiontitle">Public Class methods</div>
|
190
|
-
<div class="method">
|
191
|
-
<div class="title">
|
192
|
-
<a name="M000192"></a><b>append_features</b>(mod)
|
193
|
-
</div>
|
194
|
-
<div class="sourcecode">
|
195
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000192_source')" id="l_M000192_source">show source</a> ]</p>
|
196
|
-
<div id="M000192_source" class="dyn-source">
|
197
|
-
<pre>
|
198
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/class_extension.rb, line 64</span>
|
199
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">append_features</span>(<span class="ruby-identifier">mod</span>)
|
200
|
-
<span class="ruby-identifier">append_features_without_class_extension</span>(<span class="ruby-identifier">mod</span>)
|
201
|
-
<span class="ruby-keyword kw">end</span>
|
202
|
-
</pre>
|
203
|
-
</div>
|
204
|
-
</div>
|
205
|
-
</div>
|
206
|
-
<div class="sectiontitle">Public Instance methods</div>
|
207
|
-
<div class="method">
|
208
|
-
<div class="title">
|
209
|
-
<a name="M000164"></a><b>abstract</b>( *sym )
|
210
|
-
</div>
|
211
|
-
<div class="sourcecode">
|
212
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000164_source')" id="l_M000164_source">show source</a> ]</p>
|
213
|
-
<div id="M000164_source" class="dyn-source">
|
214
|
-
<pre>
|
215
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/abstract.rb, line 13</span>
|
216
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abstract</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">sym</span> )
|
217
|
-
<span class="ruby-identifier">sym</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
218
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">s</span> ) { <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"undefined abstraction ##{s}"</span> }
|
219
|
-
}
|
220
|
-
<span class="ruby-keyword kw">end</span>
|
221
|
-
</pre>
|
222
|
-
</div>
|
223
|
-
</div>
|
224
|
-
</div>
|
225
|
-
<div class="method">
|
226
|
-
<div class="title">
|
227
|
-
<a name="M000194"></a><b>alias_method_chain</b>(target, feature=nil)
|
228
|
-
</div>
|
229
|
-
<div class="description">
|
230
|
-
<p>
|
231
|
-
Encapsulates the common pattern of:
|
232
|
-
</p>
|
233
|
-
<pre>
|
234
|
-
alias_method :foo_without_feature, :foo
|
235
|
-
alias_method :foo, :foo_with_feature
|
236
|
-
</pre>
|
237
|
-
<p>
|
238
|
-
With this, you simply do:
|
239
|
-
</p>
|
240
|
-
<pre>
|
241
|
-
alias_method_chain :foo, :feature
|
242
|
-
</pre>
|
243
|
-
<p>
|
244
|
-
And both aliases are set up for you.
|
245
|
-
</p>
|
246
|
-
<p>
|
247
|
-
Query and bang methods (foo?, foo!) keep the same punctuation:
|
248
|
-
</p>
|
249
|
-
<pre>
|
250
|
-
alias_method_chain :foo?, :feature
|
251
|
-
</pre>
|
252
|
-
<p>
|
253
|
-
is equivalent to
|
254
|
-
</p>
|
255
|
-
<pre>
|
256
|
-
alias_method :foo_without_feature?, :foo?
|
257
|
-
alias_method :foo?, :foo_without_feature?
|
258
|
-
</pre>
|
259
|
-
<p>
|
260
|
-
so you can safely chain foo, foo?, and foo! with the same feature.
|
261
|
-
</p>
|
262
|
-
</div>
|
263
|
-
<div class="sourcecode">
|
264
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000194_source')" id="l_M000194_source">show source</a> ]</p>
|
265
|
-
<div id="M000194_source" class="dyn-source">
|
266
|
-
<pre>
|
267
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/alias_method_chain.rb, line 29</span>
|
268
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alias_method_chain</span>(<span class="ruby-identifier">target</span>, <span class="ruby-identifier">feature</span>=<span class="ruby-keyword kw">nil</span>)
|
269
|
-
<span class="ruby-comment cmt"># Strip out punctuation on predicates or bang methods since</span>
|
270
|
-
<span class="ruby-comment cmt"># e.g. target?_without_feature is not a valid method name.</span>
|
271
|
-
<span class="ruby-identifier">aliased_target</span>, <span class="ruby-identifier">punctuation</span> = <span class="ruby-identifier">target</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/([?!])$/</span>, <span class="ruby-value str">''</span>), <span class="ruby-identifier">$1</span>
|
272
|
-
<span class="ruby-identifier">alias_method</span> <span class="ruby-node">"#{aliased_target}_without_#{feature}#{punctuation}"</span>, <span class="ruby-identifier">target</span>
|
273
|
-
<span class="ruby-identifier">alias_method</span> <span class="ruby-identifier">target</span>, <span class="ruby-node">"#{aliased_target}_with_#{feature}#{punctuation}"</span>
|
274
|
-
<span class="ruby-keyword kw">end</span>
|
275
|
-
</pre>
|
276
|
-
</div>
|
277
|
-
</div>
|
278
|
-
</div>
|
279
|
-
<div class="method">
|
280
|
-
<div class="title">
|
281
|
-
<a name="M000168"></a><b>ancestor?</b>( mod )
|
282
|
-
</div>
|
283
|
-
<div class="description">
|
284
|
-
<p>
|
285
|
-
Is a given class or module an ancestor of this class or module?
|
286
|
-
</p>
|
287
|
-
<pre>
|
288
|
-
class X ; end
|
289
|
-
class Y < X ; end
|
290
|
-
|
291
|
-
X.ancestor?(Y)
|
292
|
-
</pre>
|
293
|
-
</div>
|
294
|
-
<div class="sourcecode">
|
295
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000168_source')" id="l_M000168_source">show source</a> ]</p>
|
296
|
-
<div id="M000168_source" class="dyn-source">
|
297
|
-
<pre>
|
298
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/ancestor.rb, line 12</span>
|
299
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ancestor?</span>( <span class="ruby-identifier">mod</span> )
|
300
|
-
<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">mod</span>
|
301
|
-
<span class="ruby-keyword kw">end</span>
|
302
|
-
</pre>
|
303
|
-
</div>
|
304
|
-
</div>
|
305
|
-
</div>
|
306
|
-
<div class="method">
|
307
|
-
<div class="title">
|
308
|
-
<a name="M000193"></a><b>append_features</b>(mod)
|
309
|
-
</div>
|
310
|
-
<div class="sourcecode">
|
311
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000193_source')" id="l_M000193_source">show source</a> ]</p>
|
312
|
-
<div id="M000193_source" class="dyn-source">
|
313
|
-
<pre>
|
314
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/class_extension.rb, line 74</span>
|
315
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">append_features</span>(<span class="ruby-identifier">mod</span>)
|
316
|
-
<span class="ruby-identifier">append_features_without_class_extension</span>(<span class="ruby-identifier">mod</span>)
|
317
|
-
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-identifier">class_extension</span>)
|
318
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Module</span>
|
319
|
-
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">:class_extension</span>).<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">:include</span>, <span class="ruby-identifier">class_extension</span>)
|
320
|
-
<span class="ruby-keyword kw">end</span>
|
321
|
-
<span class="ruby-keyword kw">end</span>
|
322
|
-
</pre>
|
323
|
-
</div>
|
324
|
-
</div>
|
325
|
-
</div>
|
326
|
-
<div class="method">
|
327
|
-
<div class="title">
|
328
|
-
<a name="M000174"></a><b>attr</b>(*args)
|
329
|
-
</div>
|
330
|
-
<div class="description">
|
331
|
-
<p>
|
332
|
-
There’s a school of thought that says an attribute show always have a
|
333
|
-
reader and a writer.
|
334
|
-
</p>
|
335
|
-
</div>
|
336
|
-
<div class="sourcecode">
|
337
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000174_source')" id="l_M000174_source">show source</a> ]</p>
|
338
|
-
<div id="M000174_source" class="dyn-source">
|
339
|
-
<pre>
|
340
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/attr.rb, line 10</span>
|
341
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
342
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
343
|
-
<span class="ruby-identifier">attr_accessor</span> <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
|
344
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> [ <span class="ruby-node">"#{a}"</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-node">"#{a}="</span>.<span class="ruby-identifier">to_sym</span> ] }.<span class="ruby-identifier">flatten</span>
|
345
|
-
<span class="ruby-keyword kw">end</span>
|
346
|
-
</pre>
|
347
|
-
</div>
|
348
|
-
</div>
|
349
|
-
</div>
|
350
|
-
<div class="method">
|
351
|
-
<div class="title">
|
352
|
-
<a name="M000171"></a><b>attr_setter</b>(*args)
|
353
|
-
</div>
|
354
|
-
<div class="description">
|
355
|
-
<p>
|
356
|
-
Create an attribute method for both getting and setting an instance
|
357
|
-
variable.
|
358
|
-
</p>
|
359
|
-
<pre>
|
360
|
-
attr_setter :a
|
361
|
-
</pre>
|
362
|
-
<p>
|
363
|
-
_is equivalent to_
|
364
|
-
</p>
|
365
|
-
<pre>
|
366
|
-
def a(*args)
|
367
|
-
if args.size > 0
|
368
|
-
@a = args[0]
|
369
|
-
self
|
370
|
-
else
|
371
|
-
@a
|
372
|
-
end
|
373
|
-
end
|
374
|
-
</pre>
|
375
|
-
</div>
|
376
|
-
<div class="sourcecode">
|
377
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000171_source')" id="l_M000171_source">show source</a> ]</p>
|
378
|
-
<div id="M000171_source" class="dyn-source">
|
379
|
-
<pre>
|
380
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/attr_setter.rb, line 23</span>
|
381
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_setter</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
382
|
-
|
383
|
-
<span class="ruby-identifier">make</span> = {}
|
384
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
385
|
-
<span class="ruby-identifier">make</span>[<span class="ruby-node">"#{a}"</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-node">%{
|
386
|
-
def #{a}(*args)
|
387
|
-
args.size > 0 ? ( @#{a}=args[0] ; self ) : @#{a}
|
388
|
-
end
|
389
|
-
}</span>
|
390
|
-
}
|
391
|
-
<span class="ruby-identifier">module_eval</span>( <span class="ruby-identifier">make</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) )
|
392
|
-
|
393
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">make</span>.<span class="ruby-identifier">keys</span>
|
394
|
-
<span class="ruby-keyword kw">end</span>
|
395
|
-
</pre>
|
396
|
-
</div>
|
397
|
-
</div>
|
398
|
-
</div>
|
399
|
-
<div class="method">
|
400
|
-
<div class="title">
|
401
|
-
<a name="M000156"></a><b>attr_tester</b>(*args)
|
402
|
-
</div>
|
403
|
-
<div class="description">
|
404
|
-
<p>
|
405
|
-
Create an tester attribute. This creates two methods for each given
|
406
|
-
variable name. One is used to test the attribute and the other is used to
|
407
|
-
set or toggle it.
|
408
|
-
</p>
|
409
|
-
<pre>
|
410
|
-
attr_switch :a
|
411
|
-
</pre>
|
412
|
-
<p>
|
413
|
-
is equivalent to
|
414
|
-
</p>
|
415
|
-
<pre>
|
416
|
-
def a?
|
417
|
-
@a ? true : @a
|
418
|
-
end
|
419
|
-
|
420
|
-
def a!(switch=nack)
|
421
|
-
if switch == nack
|
422
|
-
@a = ! @a
|
423
|
-
else
|
424
|
-
@a = @a ? switch : @a
|
425
|
-
self
|
426
|
-
end
|
427
|
-
end
|
428
|
-
</pre>
|
429
|
-
</div>
|
430
|
-
<div class="sourcecode">
|
431
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000156_source')" id="l_M000156_source">show source</a> ]</p>
|
432
|
-
<div id="M000156_source" class="dyn-source">
|
433
|
-
<pre>
|
434
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/attr_tester.rb, line 26</span>
|
435
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_tester</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
436
|
-
<span class="ruby-identifier">make</span> = {}
|
437
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
438
|
-
<span class="ruby-identifier">make</span>[<span class="ruby-node">"#{a}?"</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-node">%{ def #{a}?; @#{a} ? true : @#{a}; end }</span>
|
439
|
-
<span class="ruby-identifier">make</span>[<span class="ruby-node">"#{a}!"</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-node">%{
|
440
|
-
def #{a}!(switch=nack)
|
441
|
-
if switch==nack
|
442
|
-
@#{a} = !@#{a}
|
443
|
-
else
|
444
|
-
@#{a} = @#{a} ? switch : @#{a}
|
445
|
-
self
|
446
|
-
end
|
447
|
-
end
|
448
|
-
}</span>
|
449
|
-
}
|
450
|
-
<span class="ruby-identifier">module_eval</span> <span class="ruby-identifier">make</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>)
|
451
|
-
|
452
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">make</span>.<span class="ruby-identifier">keys</span>
|
453
|
-
<span class="ruby-keyword kw">end</span>
|
454
|
-
</pre>
|
455
|
-
</div>
|
456
|
-
</div>
|
457
|
-
</div>
|
458
|
-
<div class="method">
|
459
|
-
<div class="title">
|
460
|
-
<a name="M000189"></a><b>attr_tester</b>(*args)
|
461
|
-
</div>
|
462
|
-
<div class="description">
|
463
|
-
<p>
|
464
|
-
Create an tester attribute. This creates two methods for each given
|
465
|
-
variable name. One is used to test the attribute and the other is used to
|
466
|
-
set or toggle it.
|
467
|
-
</p>
|
468
|
-
<pre>
|
469
|
-
attr_switch :a
|
470
|
-
</pre>
|
471
|
-
<p>
|
472
|
-
is equivalent to
|
473
|
-
</p>
|
474
|
-
<pre>
|
475
|
-
def a?
|
476
|
-
@a ? true : @a
|
477
|
-
end
|
478
|
-
|
479
|
-
def a!(switch=nack)
|
480
|
-
if switch == nack
|
481
|
-
@a = ! @a
|
482
|
-
else
|
483
|
-
@a = @a ? switch : @a
|
484
|
-
self
|
485
|
-
end
|
486
|
-
end
|
487
|
-
</pre>
|
488
|
-
</div>
|
489
|
-
<div class="sourcecode">
|
490
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000189_source')" id="l_M000189_source">show source</a> ]</p>
|
491
|
-
<div id="M000189_source" class="dyn-source">
|
492
|
-
<pre>
|
493
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/attr_query.rb, line 26</span>
|
494
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_tester</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
495
|
-
<span class="ruby-identifier">make</span> = {}
|
496
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
497
|
-
<span class="ruby-identifier">make</span>[<span class="ruby-node">"#{a}?"</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-node">%{ def #{a}?; @#{a} ? true : @#{a}; end }</span>
|
498
|
-
<span class="ruby-identifier">make</span>[<span class="ruby-node">"#{a}!"</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-node">%{
|
499
|
-
def #{a}!(switch=nack)
|
500
|
-
if switch==nack
|
501
|
-
@#{a} = !@#{a}
|
502
|
-
else
|
503
|
-
@#{a} = @#{a} ? switch : @#{a}
|
504
|
-
self
|
505
|
-
end
|
506
|
-
end
|
507
|
-
}</span>
|
508
|
-
}
|
509
|
-
<span class="ruby-identifier">module_eval</span> <span class="ruby-identifier">make</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>)
|
510
|
-
|
511
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">make</span>.<span class="ruby-identifier">keys</span>
|
512
|
-
<span class="ruby-keyword kw">end</span>
|
513
|
-
</pre>
|
514
|
-
</div>
|
515
|
-
</div>
|
516
|
-
</div>
|
517
|
-
<div class="method">
|
518
|
-
<div class="title">
|
519
|
-
<a name="M000190"></a><b>attr_validator</b>(*symbols, &validator)
|
520
|
-
</div>
|
521
|
-
<div class="description">
|
522
|
-
<p>
|
523
|
-
Like attr_writer, but the writer method validates the setting against the
|
524
|
-
given block.
|
525
|
-
</p>
|
526
|
-
</div>
|
527
|
-
<div class="sourcecode">
|
528
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000190_source')" id="l_M000190_source">show source</a> ]</p>
|
529
|
-
<div id="M000190_source" class="dyn-source">
|
530
|
-
<pre>
|
531
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/attr_validator.rb, line 7</span>
|
532
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_validator</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">symbols</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">validator</span>)
|
533
|
-
<span class="ruby-identifier">symbols</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">symbol</span><span class="ruby-operator">|</span>
|
534
|
-
<span class="ruby-identifier">define_method</span> <span class="ruby-node">"#{symbol}="</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
535
|
-
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">validator</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">val</span>)
|
536
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"Invalid value provided for #{symbol}"</span>
|
537
|
-
<span class="ruby-keyword kw">end</span>
|
538
|
-
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{symbol}"</span>, <span class="ruby-identifier">val</span>)
|
539
|
-
<span class="ruby-keyword kw">end</span>
|
540
|
-
<span class="ruby-keyword kw">end</span>
|
541
|
-
<span class="ruby-keyword kw">end</span>
|
542
|
-
</pre>
|
543
|
-
</div>
|
544
|
-
</div>
|
545
|
-
</div>
|
546
|
-
<div class="method">
|
547
|
-
<div class="title">
|
548
|
-
<a name="M000158"></a><b>basename</b>()
|
549
|
-
</div>
|
550
|
-
<div class="description">
|
551
|
-
<p>
|
552
|
-
Returns the root name of the module/class.
|
553
|
-
</p>
|
554
|
-
<pre>
|
555
|
-
module Example
|
556
|
-
class Demo
|
557
|
-
end
|
558
|
-
end
|
559
|
-
|
560
|
-
Demo.name #=> Example::Demo
|
561
|
-
Demo.basename #=> Demo
|
562
|
-
</pre>
|
563
|
-
<p>
|
564
|
-
For anonymous modules this will provide a basename based on Module#inspect.
|
565
|
-
</p>
|
566
|
-
<pre>
|
567
|
-
m = Module.new
|
568
|
-
m.inspect #=> "#<Module:0xb7bb0434>"
|
569
|
-
m.basename #=> "Module_0xb7bb0434"
|
570
|
-
</pre>
|
571
|
-
</div>
|
572
|
-
<div class="sourcecode">
|
573
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000158_source')" id="l_M000158_source">show source</a> ]</p>
|
574
|
-
<div id="M000158_source" class="dyn-source">
|
575
|
-
<pre>
|
576
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/basename.rb, line 20</span>
|
577
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">basename</span>
|
578
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">empty?</span>
|
579
|
-
<span class="ruby-identifier">name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^.*::/</span>, <span class="ruby-value str">''</span>)
|
580
|
-
<span class="ruby-keyword kw">else</span>
|
581
|
-
<span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt">#inspect.gsub('#<','').gsub('>','').sub(':', '_')</span>
|
582
|
-
<span class="ruby-keyword kw">end</span>
|
583
|
-
<span class="ruby-keyword kw">end</span>
|
584
|
-
</pre>
|
585
|
-
</div>
|
586
|
-
</div>
|
587
|
-
</div>
|
588
|
-
<div class="method">
|
589
|
-
<div class="title">
|
590
|
-
<a name="M000184"></a><b>by_name</b>(name)
|
591
|
-
</div>
|
592
|
-
<div class="description">
|
593
|
-
<p>
|
594
|
-
<em>Note: the following documentation uses "class" because
|
595
|
-
it’s more common, but it applies to modules as well.</em>
|
596
|
-
</p>
|
597
|
-
<p>
|
598
|
-
Given the <em>name</em> of a class, returns the class itself (i.e. instance
|
599
|
-
of <a href="Class.html">Class</a>). The dereferencing starts at <a
|
600
|
-
href="Object.html">Object</a>. That is,
|
601
|
-
</p>
|
602
|
-
<pre>
|
603
|
-
Class.by_name("String")
|
604
|
-
</pre>
|
605
|
-
<p>
|
606
|
-
is equivalent to
|
607
|
-
</p>
|
608
|
-
<pre>
|
609
|
-
Object.const_get("String")
|
610
|
-
</pre>
|
611
|
-
<p>
|
612
|
-
The parameter <em>name</em> is expected to be a <a
|
613
|
-
href="Symbol.html">Symbol</a> or <a href="String.html">String</a>, or at
|
614
|
-
least to respond to <tt>to_str</tt>.
|
615
|
-
</p>
|
616
|
-
<p>
|
617
|
-
An ArgumentError is raised if <em>name</em> does not correspond to an
|
618
|
-
existing class. If <em>name</em> is not even a valid class name, the error
|
619
|
-
you’ll get is not defined.
|
620
|
-
</p>
|
621
|
-
<p>
|
622
|
-
Examples:
|
623
|
-
</p>
|
624
|
-
<pre>
|
625
|
-
Class.by_name("String") # -> String
|
626
|
-
Class.by_name("::String") # -> String
|
627
|
-
Class.by_name("Process::Sys") # -> Process::Sys
|
628
|
-
Class.by_name("GorillaZ") # -> (ArgumentError)
|
629
|
-
|
630
|
-
Class.by_name("Enumerable") # -> Enumerable
|
631
|
-
Module.by_name("Enumerable") # -> Enumerable
|
632
|
-
</pre>
|
633
|
-
</div>
|
634
|
-
<div class="sourcecode">
|
635
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000184_source')" id="l_M000184_source">show source</a> ]</p>
|
636
|
-
<div id="M000184_source" class="dyn-source">
|
637
|
-
<pre>
|
638
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/by_name.rb, line 37</span>
|
639
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">by_name</span>(<span class="ruby-identifier">name</span>)
|
640
|
-
<span class="ruby-identifier">result</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">constant</span>(<span class="ruby-identifier">name</span>)
|
641
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">kind_of?</span>( <span class="ruby-constant">Module</span> )
|
642
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"#{name} is not a module or class"</span>
|
643
|
-
<span class="ruby-keyword kw">end</span>
|
644
|
-
</pre>
|
645
|
-
</div>
|
646
|
-
</div>
|
647
|
-
</div>
|
648
|
-
<div class="method">
|
649
|
-
<div class="title">
|
650
|
-
<a name="M000182"></a><b>clone_removing</b>( *meths )
|
651
|
-
</div>
|
652
|
-
<div class="description">
|
653
|
-
<p>
|
654
|
-
Returns an anonymous module with the specified methods of the receiving
|
655
|
-
module removed.
|
656
|
-
</p>
|
657
|
-
</div>
|
658
|
-
<div class="sourcecode">
|
659
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000182_source')" id="l_M000182_source">show source</a> ]</p>
|
660
|
-
<div id="M000182_source" class="dyn-source">
|
661
|
-
<pre>
|
662
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/clone_using.rb, line 19</span>
|
663
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone_removing</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">meths</span> )
|
664
|
-
<span class="ruby-identifier">mod</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
665
|
-
<span class="ruby-identifier">methods_to_remove</span> = <span class="ruby-identifier">meths</span>
|
666
|
-
<span class="ruby-identifier">methods_to_remove</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">class_eval</span> { <span class="ruby-identifier">remove_method</span> <span class="ruby-identifier">m</span> } }
|
667
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">mod</span>
|
668
|
-
<span class="ruby-keyword kw">end</span>
|
669
|
-
</pre>
|
670
|
-
</div>
|
671
|
-
</div>
|
672
|
-
</div>
|
673
|
-
<div class="method">
|
674
|
-
<div class="title">
|
675
|
-
<a name="M000181"></a><b>clone_renaming</b>( pairs )
|
676
|
-
</div>
|
677
|
-
<div class="description">
|
678
|
-
<p>
|
679
|
-
Returns an anonymous module with the specified methods of the receiving
|
680
|
-
module renamed.
|
681
|
-
</p>
|
682
|
-
</div>
|
683
|
-
<div class="sourcecode">
|
684
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000181_source')" id="l_M000181_source">show source</a> ]</p>
|
685
|
-
<div id="M000181_source" class="dyn-source">
|
686
|
-
<pre>
|
687
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/clone_using.rb, line 6</span>
|
688
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone_renaming</span>( <span class="ruby-identifier">pairs</span> )
|
689
|
-
<span class="ruby-identifier">mod</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
690
|
-
<span class="ruby-identifier">pairs</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">from_sym</span><span class="ruby-operator">|</span>
|
691
|
-
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">class_eval</span> {
|
692
|
-
<span class="ruby-identifier">alias_method</span>( <span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">from_sym</span> )
|
693
|
-
<span class="ruby-identifier">undef_method</span>( <span class="ruby-identifier">from_sym</span> )
|
694
|
-
}
|
695
|
-
}
|
696
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">mod</span>
|
697
|
-
<span class="ruby-keyword kw">end</span>
|
698
|
-
</pre>
|
699
|
-
</div>
|
700
|
-
</div>
|
701
|
-
</div>
|
702
|
-
<div class="method">
|
703
|
-
<div class="title">
|
704
|
-
<a name="M000183"></a><b>clone_using</b>( *meths )
|
705
|
-
</div>
|
706
|
-
<div class="description">
|
707
|
-
<p>
|
708
|
-
Returns an anonymous module with only the specified methods of the
|
709
|
-
receiving module intact.
|
710
|
-
</p>
|
711
|
-
</div>
|
712
|
-
<div class="sourcecode">
|
713
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000183_source')" id="l_M000183_source">show source</a> ]</p>
|
714
|
-
<div id="M000183_source" class="dyn-source">
|
715
|
-
<pre>
|
716
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/clone_using.rb, line 28</span>
|
717
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone_using</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">meths</span> )
|
718
|
-
<span class="ruby-identifier">meths</span> = <span class="ruby-identifier">meths</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">m</span>.<span class="ruby-identifier">to_s</span> }
|
719
|
-
<span class="ruby-identifier">methods_to_remove</span> = (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_methods</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">meths</span>)
|
720
|
-
<span class="ruby-identifier">mod</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">dup</span>
|
721
|
-
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">class_eval</span> { <span class="ruby-identifier">methods_to_remove</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">undef_method</span> <span class="ruby-identifier">m</span> } }
|
722
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">mod</span>
|
723
|
-
<span class="ruby-keyword kw">end</span>
|
724
|
-
</pre>
|
725
|
-
</div>
|
726
|
-
</div>
|
727
|
-
</div>
|
728
|
-
<div class="method">
|
729
|
-
<div class="title">
|
730
|
-
<a name="M000176"></a><b>compare_on</b>(*fields)
|
731
|
-
</div>
|
732
|
-
<div class="description">
|
733
|
-
<p>
|
734
|
-
Alias for <a href="Module.html#M000175">sort_on</a>
|
735
|
-
</p>
|
736
|
-
</div>
|
737
|
-
</div>
|
738
|
-
<div class="method">
|
739
|
-
<div class="title">
|
740
|
-
<a name="M000173"></a><b>dirname</b>()
|
741
|
-
</div>
|
742
|
-
<div class="description">
|
743
|
-
<p>
|
744
|
-
Returns the name of module’s container module.
|
745
|
-
</p>
|
746
|
-
<pre>
|
747
|
-
module Example
|
748
|
-
class Demo
|
749
|
-
end
|
750
|
-
end
|
751
|
-
|
752
|
-
Demo.name #=> "Example::Demo"
|
753
|
-
Demo.dirname #=> "Example"
|
754
|
-
</pre>
|
755
|
-
<p>
|
756
|
-
See also <a href="Module.html#M000158">Module#basename</a>.
|
757
|
-
</p>
|
758
|
-
</div>
|
759
|
-
<div class="sourcecode">
|
760
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000173_source')" id="l_M000173_source">show source</a> ]</p>
|
761
|
-
<div id="M000173_source" class="dyn-source">
|
762
|
-
<pre>
|
763
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/dirname.rb, line 15</span>
|
764
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirname</span>
|
765
|
-
<span class="ruby-identifier">name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/::[^:]*$/</span>, <span class="ruby-value str">''</span>)
|
766
|
-
<span class="ruby-keyword kw">end</span>
|
767
|
-
</pre>
|
768
|
-
</div>
|
769
|
-
</div>
|
770
|
-
</div>
|
771
|
-
<div class="method">
|
772
|
-
<div class="title">
|
773
|
-
<a name="M000178"></a><b>equate_on</b>(*fields)
|
774
|
-
</div>
|
775
|
-
<div class="description">
|
776
|
-
<p>
|
777
|
-
Generates identity/key methods based on specified attributes.
|
778
|
-
</p>
|
779
|
-
<pre>
|
780
|
-
equate_on :a, :b
|
781
|
-
</pre>
|
782
|
-
<p>
|
783
|
-
_is equivalent to_
|
784
|
-
</p>
|
785
|
-
<pre>
|
786
|
-
def ==(o)
|
787
|
-
self.a == o.a && self.b == o.b
|
788
|
-
end
|
789
|
-
|
790
|
-
def eql?(o)
|
791
|
-
self.a.eql?(o.a) && self.b.eql?(o.b)
|
792
|
-
end
|
793
|
-
|
794
|
-
def hash()
|
795
|
-
self.a.hash ^ self.b.hash
|
796
|
-
end
|
797
|
-
</pre>
|
798
|
-
</div>
|
799
|
-
<div class="aka">
|
800
|
-
This method is also aliased as
|
801
|
-
<a href="Module.html#M000179">key_attributes</a>
|
802
|
-
</div>
|
803
|
-
<div class="sourcecode">
|
804
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000178_source')" id="l_M000178_source">show source</a> ]</p>
|
805
|
-
<div id="M000178_source" class="dyn-source">
|
806
|
-
<pre>
|
807
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/equate_on.rb, line 25</span>
|
808
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">equate_on</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">fields</span>)
|
809
|
-
<span class="ruby-identifier">code</span> = <span class="ruby-value str">""</span>
|
810
|
-
<span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"def ==(o) "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-node">"self.#{f} == o.#{f}"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" && "</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">" end\n"</span>
|
811
|
-
<span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"def eql?(o) "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-node">"self.#{f}.eql?(o.#{f})"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" && "</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">" end\n"</span>
|
812
|
-
<span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"def hash() "</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">fields</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-node">"self.#{f}.hash"</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" ^ "</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">" end\n"</span>
|
813
|
-
<span class="ruby-identifier">class_eval</span>( <span class="ruby-identifier">code</span> )
|
814
|
-
<span class="ruby-identifier">fields</span>
|
815
|
-
<span class="ruby-keyword kw">end</span>
|
816
|
-
</pre>
|
817
|
-
</div>
|
818
|
-
</div>
|
819
|
-
</div>
|
820
|
-
<div class="method">
|
821
|
-
<div class="title">
|
822
|
-
<a name="M000159"></a><b>generate_instance_method_name</b>( name='a' )
|
823
|
-
</div>
|
824
|
-
<div class="description">
|
825
|
-
<p>
|
826
|
-
Generates a new symbol that is unique among the inctance methods of the
|
827
|
-
class/module. If a name argument is given, it will generate a similar name.
|
828
|
-
</p>
|
829
|
-
<pre>
|
830
|
-
Class.generate_instance_method_name( :class ) => :_clast_
|
831
|
-
</pre>
|
832
|
-
</div>
|
833
|
-
<div class="sourcecode">
|
834
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000159_source')" id="l_M000159_source">show source</a> ]</p>
|
835
|
-
<div id="M000159_source" class="dyn-source">
|
836
|
-
<pre>
|
837
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/generate_instance_method_name.rb, line 10</span>
|
838
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_instance_method_name</span>( <span class="ruby-identifier">name</span>=<span class="ruby-value str">'a'</span> )
|
839
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>
|
840
|
-
<span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">method_defined?</span>( <span class="ruby-node">"_#{s}_"</span> )
|
841
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">s</span>.<span class="ruby-identifier">succ</span>
|
842
|
-
<span class="ruby-keyword kw">end</span>
|
843
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"_#{s}_"</span>.<span class="ruby-identifier">to_sym</span>
|
844
|
-
<span class="ruby-keyword kw">end</span>
|
845
|
-
</pre>
|
846
|
-
</div>
|
847
|
-
</div>
|
848
|
-
</div>
|
849
|
-
<div class="method">
|
850
|
-
<div class="title">
|
851
|
-
<a name="M000169"></a><b>include_as</b>( h )
|
852
|
-
</div>
|
853
|
-
<div class="description">
|
854
|
-
<p>
|
855
|
-
Include a module via a specified namespace.
|
856
|
-
</p>
|
857
|
-
<pre>
|
858
|
-
module T
|
859
|
-
def t ; "HERE" ; end
|
860
|
-
end
|
861
|
-
|
862
|
-
class X
|
863
|
-
include_as :test => T
|
864
|
-
def t ; test.t ; end
|
865
|
-
end
|
866
|
-
|
867
|
-
X.new.t #=> "HERE"
|
868
|
-
</pre>
|
869
|
-
</div>
|
870
|
-
<div class="sourcecode">
|
871
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000169_source')" id="l_M000169_source">show source</a> ]</p>
|
872
|
-
<div id="M000169_source" class="dyn-source">
|
873
|
-
<pre>
|
874
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/include_as.rb, line 19</span>
|
875
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include_as</span>( <span class="ruby-identifier">h</span> )
|
876
|
-
<span class="ruby-identifier">h</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">mod</span><span class="ruby-operator">|</span>
|
877
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">self</span>
|
878
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">SimpleDelegator</span>) {
|
879
|
-
<span class="ruby-identifier">include</span> <span class="ruby-identifier">mod</span>
|
880
|
-
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">:initialize</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">s</span>) }
|
881
|
-
}
|
882
|
-
<span class="ruby-identifier">class_eval</span> {
|
883
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">name</span> ) {
|
884
|
-
<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">"@#{name}"</span>, <span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-node">"@#{name}"</span> ) <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">s</span>) )
|
885
|
-
}
|
886
|
-
}
|
887
|
-
}
|
888
|
-
<span class="ruby-keyword kw">end</span>
|
889
|
-
</pre>
|
890
|
-
</div>
|
891
|
-
</div>
|
892
|
-
</div>
|
893
|
-
<div class="method">
|
894
|
-
<div class="title">
|
895
|
-
<a name="M000151"></a><b>initializer</b>(*attributes, &block)
|
896
|
-
</div>
|
897
|
-
<div class="description">
|
898
|
-
<p>
|
899
|
-
Automatically create an initializer assigning the given arguments.
|
900
|
-
</p>
|
901
|
-
<pre>
|
902
|
-
class MyClass
|
903
|
-
initializer(:a, "b", :c)
|
904
|
-
end
|
905
|
-
</pre>
|
906
|
-
<p>
|
907
|
-
_is equivalent to_
|
908
|
-
</p>
|
909
|
-
<pre>
|
910
|
-
class MyClass
|
911
|
-
def initialize(a, b, c)
|
912
|
-
@a,@b,@c = a,b,c
|
913
|
-
end
|
914
|
-
end
|
915
|
-
</pre>
|
916
|
-
<p>
|
917
|
-
Downside: Initializers defined like this can’t take blocks. This can
|
918
|
-
be fixed when Ruby 1.9 is out.
|
919
|
-
</p>
|
920
|
-
<p>
|
921
|
-
The initializer will not raise an Exception when the user does not supply a
|
922
|
-
value for each instance variable. In that case it will just set the
|
923
|
-
instance variable to nil. You can assign default values or raise an
|
924
|
-
Exception in the block.
|
925
|
-
</p>
|
926
|
-
</div>
|
927
|
-
<div class="sourcecode">
|
928
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000151_source')" id="l_M000151_source">show source</a> ]</p>
|
929
|
-
<div id="M000151_source" class="dyn-source">
|
930
|
-
<pre>
|
931
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/initializer.rb, line 27</span>
|
932
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initializer</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attributes</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
933
|
-
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">:initialize</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
934
|
-
<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">zip</span>(<span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
|
935
|
-
<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{sym}"</span>, <span class="ruby-identifier">value</span>)
|
936
|
-
<span class="ruby-keyword kw">end</span>
|
937
|
-
|
938
|
-
<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
939
|
-
<span class="ruby-keyword kw">end</span>
|
940
|
-
<span class="ruby-keyword kw">end</span>
|
941
|
-
</pre>
|
942
|
-
</div>
|
943
|
-
</div>
|
944
|
-
</div>
|
945
|
-
<div class="method">
|
946
|
-
<div class="title">
|
947
|
-
<a name="M000148"></a><b>instance_method!</b>(s)
|
948
|
-
</div>
|
949
|
-
<div class="description">
|
950
|
-
<p>
|
951
|
-
Easy access to method as objects, and they retain state!
|
952
|
-
</p>
|
953
|
-
<pre>
|
954
|
-
module K
|
955
|
-
def hello
|
956
|
-
puts "Hello World!"
|
957
|
-
end
|
958
|
-
end
|
959
|
-
p K.instance_method!(:hello) #=> <UnboundMethod: #hello>
|
960
|
-
</pre>
|
961
|
-
<p>
|
962
|
-
CAUTION! This will not work exactly right until class variable lookup is
|
963
|
-
fixed. Presently it is limited to the scope of the current module/class.
|
964
|
-
</p>
|
965
|
-
</div>
|
966
|
-
<div class="sourcecode">
|
967
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000148_source')" id="l_M000148_source">show source</a> ]</p>
|
968
|
-
<div id="M000148_source" class="dyn-source">
|
969
|
-
<pre>
|
970
|
-
<span class="ruby-comment cmt"># File lib/facets/core/kernel/method.rb, line 61</span>
|
971
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_method!</span>(<span class="ruby-identifier">s</span>)
|
972
|
-
<span class="ruby-comment cmt">#( @@__instance_methods__ ||= {} )[s] ||= instance_method(s) # TODO when fixed</span>
|
973
|
-
( <span class="ruby-ivar">@__instance_methods__</span> <span class="ruby-operator">||=</span> {} )[<span class="ruby-identifier">s</span>] <span class="ruby-operator">||=</span> <span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">s</span>)
|
974
|
-
<span class="ruby-keyword kw">end</span>
|
975
|
-
</pre>
|
976
|
-
</div>
|
977
|
-
</div>
|
978
|
-
</div>
|
979
|
-
<div class="method">
|
980
|
-
<div class="title">
|
981
|
-
<a name="M000155"></a><b>instance_methods</b>(*args)
|
982
|
-
</div>
|
983
|
-
<div class="description">
|
984
|
-
<p>
|
985
|
-
Provides an improved method lookup routnine. It returns a list of methods
|
986
|
-
according to symbol(s) given.
|
987
|
-
</p>
|
988
|
-
<p>
|
989
|
-
Recognized symbols are:
|
990
|
-
</p>
|
991
|
-
<ul>
|
992
|
-
<li><tt>:public</tt> include public methods
|
993
|
-
|
994
|
-
</li>
|
995
|
-
<li><tt>:private</tt> include private methods
|
996
|
-
|
997
|
-
</li>
|
998
|
-
<li><tt>:protected</tt> include protected methods
|
999
|
-
|
1000
|
-
</li>
|
1001
|
-
<li><tt>:ancestors</tt> include all ancestor’s methods
|
1002
|
-
|
1003
|
-
</li>
|
1004
|
-
<li><tt>:inherited</tt> (same as above)
|
1005
|
-
|
1006
|
-
</li>
|
1007
|
-
<li><tt>:local</tti> include non-ancestor methods
|
1008
|
-
|
1009
|
-
</li>
|
1010
|
-
<li><tt>:all</tt> include all of the above
|
1011
|
-
|
1012
|
-
</li>
|
1013
|
-
</ul>
|
1014
|
-
<p>
|
1015
|
-
This method also uses the symbol-not system. So you can specify the inverse
|
1016
|
-
of all of the above. For instance ~:public would mean :private, :protected
|
1017
|
-
(see facet/symbol/not).
|
1018
|
-
</p>
|
1019
|
-
<p>
|
1020
|
-
If no symbol is given then :public, :local is assumed. Unrecognized symbols
|
1021
|
-
raise an error.
|
1022
|
-
</p>
|
1023
|
-
<pre>
|
1024
|
-
module Demo
|
1025
|
-
def test
|
1026
|
-
puts("Hello World!")
|
1027
|
-
end
|
1028
|
-
end
|
1029
|
-
|
1030
|
-
Demo.instance_methods(:local) #=> ['test']
|
1031
|
-
</pre>
|
1032
|
-
<p>
|
1033
|
-
To maintain backward compatibility <tt>true</tt> as an intitial argument is
|
1034
|
-
converted to :local, :ancestors (i.e. it includes both).
|
1035
|
-
</p>
|
1036
|
-
</div>
|
1037
|
-
<div class="sourcecode">
|
1038
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000155_source')" id="l_M000155_source">show source</a> ]</p>
|
1039
|
-
<div id="M000155_source" class="dyn-source">
|
1040
|
-
<pre>
|
1041
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/instance_methods.rb, line 40</span>
|
1042
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instance_methods</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1043
|
-
|
1044
|
-
<span class="ruby-comment cmt"># for backward compatibility</span>
|
1045
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
1046
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
|
1047
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">TrueClass</span>
|
1048
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
1049
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:ancestors</span>
|
1050
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:local</span>
|
1051
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">FalseClass</span>
|
1052
|
-
<span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
1053
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">:local</span>
|
1054
|
-
<span class="ruby-keyword kw">end</span>
|
1055
|
-
|
1056
|
-
<span class="ruby-comment cmt"># default public, local</span>
|
1057
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator">|=</span> [<span class="ruby-identifier">:public</span>] <span class="ruby-keyword kw">unless</span> [<span class="ruby-identifier">:publix</span>,<span class="ruby-identifier">:private</span>,<span class="ruby-identifier">:protected</span>,<span class="ruby-identifier">:all</span>].<span class="ruby-identifier">any?</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">a</span>) }
|
1058
|
-
<span class="ruby-identifier">args</span> <span class="ruby-operator">|=</span> [<span class="ruby-identifier">:ancestors</span>,<span class="ruby-identifier">:local</span>] <span class="ruby-keyword kw">unless</span> [<span class="ruby-identifier">:ancestors</span>,<span class="ruby-identifier">:inherited</span>,<span class="ruby-identifier">:local</span>,<span class="ruby-identifier">:all</span>].<span class="ruby-identifier">any?</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">a</span>) }
|
1059
|
-
|
1060
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">any?</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-constant">METHOD_TYPES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">a</span>) }
|
1061
|
-
|
1062
|
-
<span class="ruby-identifier">pos</span>, <span class="ruby-identifier">neg</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">partition</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">not?</span> }
|
1063
|
-
|
1064
|
-
<span class="ruby-identifier">m</span> = []
|
1065
|
-
|
1066
|
-
<span class="ruby-identifier">pos</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
1067
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">n</span>
|
1068
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:inherited</span>, <span class="ruby-identifier">:ancestors</span>
|
1069
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> ( <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:public</span>)
|
1070
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> ( <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:private</span>)
|
1071
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> ( <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:protected</span>)
|
1072
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:local</span>
|
1073
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:public</span>)
|
1074
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:private</span>)
|
1075
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pos</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:protected</span>)
|
1076
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:all</span>
|
1077
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1078
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1079
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">|=</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1080
|
-
<span class="ruby-keyword kw">end</span>
|
1081
|
-
<span class="ruby-keyword kw">end</span>
|
1082
|
-
|
1083
|
-
<span class="ruby-identifier">neg</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
|
1084
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">n</span>
|
1085
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:public</span>
|
1086
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1087
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:private</span>
|
1088
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1089
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:protected</span>
|
1090
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">true</span> )
|
1091
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:inherited</span>, <span class="ruby-identifier">:ancestors</span>
|
1092
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> ( <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) )
|
1093
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> ( <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) )
|
1094
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> ( <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">true</span> ) <span class="ruby-operator">-</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">false</span> ) )
|
1095
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:local</span>
|
1096
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">public_instance_methods</span>( <span class="ruby-keyword kw">false</span> )
|
1097
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">private_instance_methods</span>( <span class="ruby-keyword kw">false</span> )
|
1098
|
-
<span class="ruby-identifier">m</span> <span class="ruby-operator">-=</span> <span class="ruby-identifier">protected_instance_methods</span>( <span class="ruby-keyword kw">false</span> )
|
1099
|
-
<span class="ruby-keyword kw">end</span>
|
1100
|
-
<span class="ruby-keyword kw">end</span>
|
1101
|
-
|
1102
|
-
<span class="ruby-identifier">m</span>.<span class="ruby-identifier">sort</span>
|
1103
|
-
<span class="ruby-keyword kw">end</span>
|
1104
|
-
</pre>
|
1105
|
-
</div>
|
1106
|
-
</div>
|
1107
|
-
</div>
|
1108
|
-
<div class="method">
|
1109
|
-
<div class="title">
|
1110
|
-
<a name="M000157"></a><b>integrate</b>( mod, &block )
|
1111
|
-
</div>
|
1112
|
-
<div class="sourcecode">
|
1113
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000157_source')" id="l_M000157_source">show source</a> ]</p>
|
1114
|
-
<div id="M000157_source" class="dyn-source">
|
1115
|
-
<pre>
|
1116
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/integrate.rb, line 39</span>
|
1117
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">integrate</span>( <span class="ruby-identifier">mod</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span> )
|
1118
|
-
<span class="ruby-comment cmt">#include mod.revisal( &blk )</span>
|
1119
|
-
<span class="ruby-identifier">m</span> = <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">include</span> <span class="ruby-identifier">mod</span> }
|
1120
|
-
<span class="ruby-identifier">m</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>
|
1121
|
-
<span class="ruby-identifier">include</span> <span class="ruby-identifier">m</span>
|
1122
|
-
<span class="ruby-keyword kw">end</span>
|
1123
|
-
</pre>
|
1124
|
-
</div>
|
1125
|
-
</div>
|
1126
|
-
</div>
|
1127
|
-
<div class="method">
|
1128
|
-
<div class="title">
|
1129
|
-
<a name="M000153"></a><b>is?</b>( base )
|
1130
|
-
</div>
|
1131
|
-
<div class="description">
|
1132
|
-
<p>
|
1133
|
-
Is a given class or module an ancestor of this class or module?
|
1134
|
-
</p>
|
1135
|
-
<pre>
|
1136
|
-
class X ; end
|
1137
|
-
class Y < X ; end
|
1138
|
-
|
1139
|
-
Y.is?(X) #=> true
|
1140
|
-
</pre>
|
1141
|
-
</div>
|
1142
|
-
<div class="sourcecode">
|
1143
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000153_source')" id="l_M000153_source">show source</a> ]</p>
|
1144
|
-
<div id="M000153_source" class="dyn-source">
|
1145
|
-
<pre>
|
1146
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/is.rb, line 22</span>
|
1147
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is?</span>( <span class="ruby-identifier">base</span> )
|
1148
|
-
<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>).<span class="ruby-identifier">include?</span>( <span class="ruby-identifier">base</span> )
|
1149
|
-
<span class="ruby-keyword kw">end</span>
|
1150
|
-
</pre>
|
1151
|
-
</div>
|
1152
|
-
</div>
|
1153
|
-
</div>
|
1154
|
-
<div class="method">
|
1155
|
-
<div class="title">
|
1156
|
-
<a name="M000179"></a><b>key_attributes</b>(*fields)
|
1157
|
-
</div>
|
1158
|
-
<div class="description">
|
1159
|
-
<p>
|
1160
|
-
Alias for <a href="Module.html#M000178">equate_on</a>
|
1161
|
-
</p>
|
1162
|
-
</div>
|
1163
|
-
</div>
|
1164
|
-
<div class="method">
|
1165
|
-
<div class="title">
|
1166
|
-
<a name="M000185"></a><b>memoize</b>(*meths)
|
1167
|
-
</div>
|
1168
|
-
<div class="description">
|
1169
|
-
<p>
|
1170
|
-
Directive for making your functions faster by trading space for time. When
|
1171
|
-
you "memoize" a method/function its results are cached so that
|
1172
|
-
later calls with the same arguments returns results in the cache instead of
|
1173
|
-
recalculating them.
|
1174
|
-
</p>
|
1175
|
-
<pre>
|
1176
|
-
class T
|
1177
|
-
def initialize(a)
|
1178
|
-
@a = a
|
1179
|
-
end
|
1180
|
-
def a
|
1181
|
-
"#{@a ^ 3 + 4}"
|
1182
|
-
end
|
1183
|
-
memoize :a
|
1184
|
-
end
|
1185
|
-
|
1186
|
-
t = T.new
|
1187
|
-
t.a.__id__ == t.a.__id__ #=> true
|
1188
|
-
</pre>
|
1189
|
-
</div>
|
1190
|
-
<div class="sourcecode">
|
1191
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000185_source')" id="l_M000185_source">show source</a> ]</p>
|
1192
|
-
<div id="M000185_source" class="dyn-source">
|
1193
|
-
<pre>
|
1194
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/memoize.rb, line 26</span>
|
1195
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">memoize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">meths</span>)
|
1196
|
-
<span class="ruby-ivar">@_MEMOIZE_CACHE</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
1197
|
-
<span class="ruby-identifier">meths</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">meth</span><span class="ruby-operator">|</span>
|
1198
|
-
<span class="ruby-identifier">mc</span> = <span class="ruby-ivar">@_MEMOIZE_CACHE</span>[<span class="ruby-identifier">meth</span>] = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
1199
|
-
<span class="ruby-identifier">old</span> = <span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">meth</span>)
|
1200
|
-
<span class="ruby-identifier">new</span> = <span class="ruby-identifier">proc</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
1201
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mc</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">args</span>
|
1202
|
-
<span class="ruby-identifier">mc</span>[<span class="ruby-identifier">args</span>]
|
1203
|
-
<span class="ruby-keyword kw">else</span>
|
1204
|
-
<span class="ruby-identifier">mc</span>[<span class="ruby-identifier">args</span>] = <span class="ruby-identifier">old</span>.<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
1205
|
-
<span class="ruby-keyword kw">end</span>
|
1206
|
-
<span class="ruby-keyword kw">end</span>
|
1207
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">meth</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">new</span>)
|
1208
|
-
<span class="ruby-keyword kw">end</span>
|
1209
|
-
<span class="ruby-keyword kw">end</span>
|
1210
|
-
</pre>
|
1211
|
-
</div>
|
1212
|
-
</div>
|
1213
|
-
</div>
|
1214
|
-
<div class="method">
|
1215
|
-
<div class="title">
|
1216
|
-
<a name="M000154"></a><b>modspace</b>()
|
1217
|
-
</div>
|
1218
|
-
<div class="description">
|
1219
|
-
<p>
|
1220
|
-
Returns the module’s container module.
|
1221
|
-
</p>
|
1222
|
-
<pre>
|
1223
|
-
module Example
|
1224
|
-
class Demo
|
1225
|
-
end
|
1226
|
-
end
|
1227
|
-
|
1228
|
-
Demo.modspace #=> Example
|
1229
|
-
</pre>
|
1230
|
-
<p>
|
1231
|
-
See also <a href="Module.html#M000158">Module#basename</a>.
|
1232
|
-
</p>
|
1233
|
-
</div>
|
1234
|
-
<div class="sourcecode">
|
1235
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000154_source')" id="l_M000154_source">show source</a> ]</p>
|
1236
|
-
<div id="M000154_source" class="dyn-source">
|
1237
|
-
<pre>
|
1238
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/modspace.rb, line 17</span>
|
1239
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">modspace</span>
|
1240
|
-
<span class="ruby-identifier">eval</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>[ <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">rindex</span>( <span class="ruby-value str">'::'</span> ) ]
|
1241
|
-
<span class="ruby-keyword kw">end</span>
|
1242
|
-
</pre>
|
1243
|
-
</div>
|
1244
|
-
</div>
|
1245
|
-
</div>
|
1246
|
-
<div class="method">
|
1247
|
-
<div class="title">
|
1248
|
-
<a name="M000163"></a><b>namespace</b>( name, &blk )
|
1249
|
-
</div>
|
1250
|
-
<div class="description">
|
1251
|
-
<p>
|
1252
|
-
Create a seperated method namespace.
|
1253
|
-
</p>
|
1254
|
-
<pre>
|
1255
|
-
module T
|
1256
|
-
def t ; "HERE" ; end
|
1257
|
-
end
|
1258
|
-
|
1259
|
-
class X
|
1260
|
-
namespace :test { include T }
|
1261
|
-
def t ; test.t ; end
|
1262
|
-
end
|
1263
|
-
|
1264
|
-
X.new.t #=> "HERE"
|
1265
|
-
</pre>
|
1266
|
-
<p>
|
1267
|
-
NOTE: This is not as functional as it ought be in that the instance
|
1268
|
-
variables of the object are not accessible within the namespace.
|
1269
|
-
</p>
|
1270
|
-
</div>
|
1271
|
-
<div class="sourcecode">
|
1272
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000163_source')" id="l_M000163_source">show source</a> ]</p>
|
1273
|
-
<div id="M000163_source" class="dyn-source">
|
1274
|
-
<pre>
|
1275
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/namespace.rb, line 22</span>
|
1276
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespace</span>( <span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1277
|
-
<span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">self</span>
|
1278
|
-
<span class="ruby-identifier">c</span> = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">SimpleDelegator</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
1279
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">class_eval</span> { <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">:initialize</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">s</span>) } }
|
1280
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class_eval</span> {
|
1281
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">name</span> ) {
|
1282
|
-
<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">"@#{name}"</span>, <span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-node">"@#{name}"</span> ) <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">s</span>) )
|
1283
|
-
}
|
1284
|
-
}
|
1285
|
-
<span class="ruby-keyword kw">end</span>
|
1286
|
-
</pre>
|
1287
|
-
</div>
|
1288
|
-
</div>
|
1289
|
-
</div>
|
1290
|
-
<div class="method">
|
1291
|
-
<div class="title">
|
1292
|
-
<a name="M000166"></a><b>nesting</b>()
|
1293
|
-
</div>
|
1294
|
-
<div class="sourcecode">
|
1295
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000166_source')" id="l_M000166_source">show source</a> ]</p>
|
1296
|
-
<div id="M000166_source" class="dyn-source">
|
1297
|
-
<pre>
|
1298
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/nesting.rb, line 8</span>
|
1299
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nesting</span>
|
1300
|
-
<span class="ruby-identifier">n</span> = []
|
1301
|
-
<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/::/</span>).<span class="ruby-identifier">inject</span>(<span class="ruby-keyword kw">self</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span>, <span class="ruby-identifier">name</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span> = <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>) ; <span class="ruby-identifier">n</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">c</span> ; <span class="ruby-identifier">c</span> }
|
1302
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">n</span>
|
1303
|
-
<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="M000188"></a><b>on_included</b>(code)
|
1311
|
-
</div>
|
1312
|
-
<div class="description">
|
1313
|
-
<p>
|
1314
|
-
A useful macro for dynamic modules.
|
1315
|
-
</p>
|
1316
|
-
</div>
|
1317
|
-
<div class="sourcecode">
|
1318
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000188_source')" id="l_M000188_source">show source</a> ]</p>
|
1319
|
-
<div id="M000188_source" class="dyn-source">
|
1320
|
-
<pre>
|
1321
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/on_included.rb, line 13</span>
|
1322
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_included</span>(<span class="ruby-identifier">code</span>)
|
1323
|
-
<span class="ruby-identifier">tag</span> = <span class="ruby-identifier">caller</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">split</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/\/|\\/</span>).<span class="ruby-identifier">last</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/:|\.|\(|\)/</span>, <span class="ruby-value str">'_'</span>)
|
1324
|
-
<span class="ruby-identifier">old</span> = <span class="ruby-node">"__included_#{tag}"</span>
|
1325
|
-
<span class="ruby-identifier">module_eval</span> <span class="ruby-node">%{
|
1326
|
-
class << self
|
1327
|
-
alias_method :#{old}, :included
|
1328
|
-
def included(base)
|
1329
|
-
#{old}(base)
|
1330
|
-
#{code}
|
1331
|
-
end
|
1332
|
-
end
|
1333
|
-
}</span>
|
1334
|
-
<span class="ruby-keyword kw">end</span>
|
1335
|
-
</pre>
|
1336
|
-
</div>
|
1337
|
-
</div>
|
1338
|
-
</div>
|
1339
|
-
<div class="method">
|
1340
|
-
<div class="title">
|
1341
|
-
<a name="M000150"></a><b>redirect_method</b>( method_hash )
|
1342
|
-
</div>
|
1343
|
-
<div class="description">
|
1344
|
-
<p>
|
1345
|
-
Redirect methods to other methods. This simply defines methods by the name
|
1346
|
-
of a hash key which calls the method with the name of the hash’s
|
1347
|
-
value.
|
1348
|
-
</p>
|
1349
|
-
<pre>
|
1350
|
-
class Example
|
1351
|
-
redirect_method :hi => :hello, :hey => :hello
|
1352
|
-
def hello(name)
|
1353
|
-
puts "Hello, #{name}."
|
1354
|
-
end
|
1355
|
-
end
|
1356
|
-
|
1357
|
-
e = Example.new
|
1358
|
-
e.hello("Bob") #=> "Hello, Bob."
|
1359
|
-
e.hi("Bob") #=> "Hello, Bob."
|
1360
|
-
e.hey("Bob") #=> "Hello, Bob."
|
1361
|
-
</pre>
|
1362
|
-
<p>
|
1363
|
-
The above class definition is equivalent to:
|
1364
|
-
</p>
|
1365
|
-
<pre>
|
1366
|
-
class Example
|
1367
|
-
def hi(*args)
|
1368
|
-
hello(*args)
|
1369
|
-
end
|
1370
|
-
def hey(*args)
|
1371
|
-
hello(*args)
|
1372
|
-
end
|
1373
|
-
def hello
|
1374
|
-
puts "Hello"
|
1375
|
-
end
|
1376
|
-
end
|
1377
|
-
</pre>
|
1378
|
-
</div>
|
1379
|
-
<div class="aka">
|
1380
|
-
This method is also aliased as
|
1381
|
-
<a href="Module.html#M000160">redirect</a>
|
1382
|
-
</div>
|
1383
|
-
<div class="sourcecode">
|
1384
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000150_source')" id="l_M000150_source">show source</a> ]</p>
|
1385
|
-
<div id="M000150_source" class="dyn-source">
|
1386
|
-
<pre>
|
1387
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/redirect_method.rb, line 33</span>
|
1388
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect_method</span>( <span class="ruby-identifier">method_hash</span> )
|
1389
|
-
<span class="ruby-identifier">method_hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">targ</span>,<span class="ruby-identifier">adv</span><span class="ruby-operator">|</span>
|
1390
|
-
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">targ</span>) { <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">adv</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
|
1391
|
-
<span class="ruby-keyword kw">end</span>
|
1392
|
-
<span class="ruby-keyword kw">end</span>
|
1393
|
-
</pre>
|
1394
|
-
</div>
|
1395
|
-
</div>
|
1396
|
-
</div>
|
1397
|
-
<div class="method">
|
1398
|
-
<div class="title">
|
1399
|
-
<a name="M000187"></a><b>revisal</b>( &blk )
|
1400
|
-
</div>
|
1401
|
-
<div class="sourcecode">
|
1402
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000187_source')" id="l_M000187_source">show source</a> ]</p>
|
1403
|
-
<div id="M000187_source" class="dyn-source">
|
1404
|
-
<pre>
|
1405
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/revisal.rb, line 10</span>
|
1406
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">revisal</span>( <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1407
|
-
<span class="ruby-identifier">base</span> = <span class="ruby-keyword kw">self</span>
|
1408
|
-
<span class="ruby-identifier">nm</span> = <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">include</span> <span class="ruby-identifier">base</span> }
|
1409
|
-
<span class="ruby-identifier">nm</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>
|
1410
|
-
<span class="ruby-identifier">nm</span>
|
1411
|
-
<span class="ruby-keyword kw">end</span>
|
1412
|
-
</pre>
|
1413
|
-
</div>
|
1414
|
-
</div>
|
1415
|
-
</div>
|
1416
|
-
<div class="method">
|
1417
|
-
<div class="title">
|
1418
|
-
<a name="M000152"></a><b>shadow_all</b>( include_ancestors=true )
|
1419
|
-
</div>
|
1420
|
-
<div class="description">
|
1421
|
-
<p>
|
1422
|
-
Creates a shadow method for every currently defined method.
|
1423
|
-
</p>
|
1424
|
-
</div>
|
1425
|
-
<div class="sourcecode">
|
1426
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000152_source')" id="l_M000152_source">show source</a> ]</p>
|
1427
|
-
<div id="M000152_source" class="dyn-source">
|
1428
|
-
<pre>
|
1429
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/shadow_all.rb, line 5</span>
|
1430
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shadow_all</span>( <span class="ruby-identifier">include_ancestors</span>=<span class="ruby-keyword kw">true</span> )
|
1431
|
-
<span class="ruby-identifier">instance_methods</span>(<span class="ruby-identifier">include_ancestors</span>).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-identifier">shadow_method</span>( <span class="ruby-identifier">m</span> ) }
|
1432
|
-
<span class="ruby-keyword kw">end</span>
|
1433
|
-
</pre>
|
1434
|
-
</div>
|
1435
|
-
</div>
|
1436
|
-
</div>
|
1437
|
-
<div class="method">
|
1438
|
-
<div class="title">
|
1439
|
-
<a name="M000161"></a><b>shadow_method</b>( name, old_name=name )
|
1440
|
-
</div>
|
1441
|
-
<div class="description">
|
1442
|
-
<p>
|
1443
|
-
Define a shadow alias for a method.
|
1444
|
-
</p>
|
1445
|
-
<pre>
|
1446
|
-
class X
|
1447
|
-
shadow_method( :class )
|
1448
|
-
end
|
1449
|
-
|
1450
|
-
X.new.__class__ #=> X
|
1451
|
-
</pre>
|
1452
|
-
</div>
|
1453
|
-
<div class="sourcecode">
|
1454
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000161_source')" id="l_M000161_source">show source</a> ]</p>
|
1455
|
-
<div id="M000161_source" class="dyn-source">
|
1456
|
-
<pre>
|
1457
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/shadow_method.rb, line 11</span>
|
1458
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">shadow_method</span>( <span class="ruby-identifier">name</span>, <span class="ruby-identifier">old_name</span>=<span class="ruby-identifier">name</span> )
|
1459
|
-
<span class="ruby-identifier">name</span>, <span class="ruby-identifier">old_name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">old_name</span>.<span class="ruby-identifier">to_s</span>
|
1460
|
-
<span class="ruby-identifier">shadow_name</span> = <span class="ruby-value str">'__'</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/([=?!])$/</span>, <span class="ruby-value str">''</span>) <span class="ruby-operator"><<</span> <span class="ruby-value str">'__'</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_s</span>
|
1461
|
-
<span class="ruby-identifier">alias_method</span>( <span class="ruby-identifier">shadow_name</span>, <span class="ruby-identifier">old_name</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="M000177"></a><b>sort_attributes</b>(*fields)
|
1470
|
-
</div>
|
1471
|
-
<div class="description">
|
1472
|
-
<p>
|
1473
|
-
Alias for <a href="Module.html#M000175">sort_on</a>
|
1474
|
-
</p>
|
1475
|
-
</div>
|
1476
|
-
</div>
|
1477
|
-
<div class="method">
|
1478
|
-
<div class="title">
|
1479
|
-
<a name="M000175"></a><b>sort_on</b>(*fields)
|
1480
|
-
</div>
|
1481
|
-
<div class="description">
|
1482
|
-
<p>
|
1483
|
-
Automatically generate sorting defintions base on attribute fields.
|
1484
|
-
</p>
|
1485
|
-
<pre>
|
1486
|
-
sort_on :a, :b
|
1487
|
-
</pre>
|
1488
|
-
<p>
|
1489
|
-
_is equivalent to_
|
1490
|
-
</p>
|
1491
|
-
<pre>
|
1492
|
-
def <=>(o)
|
1493
|
-
cmp = self.a <=> o.a; return cmp unless cmp == 0
|
1494
|
-
cmp = self.b <=> o.b; return cmp unless cmp == 0
|
1495
|
-
0
|
1496
|
-
end
|
1497
|
-
</pre>
|
1498
|
-
</div>
|
1499
|
-
<div class="aka">
|
1500
|
-
This method is also aliased as
|
1501
|
-
<a href="Module.html#M000176">compare_on</a>
|
1502
|
-
<a href="Module.html#M000177">sort_attributes</a>
|
1503
|
-
</div>
|
1504
|
-
<div class="sourcecode">
|
1505
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000175_source')" id="l_M000175_source">show source</a> ]</p>
|
1506
|
-
<div id="M000175_source" class="dyn-source">
|
1507
|
-
<pre>
|
1508
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/sort_on.rb, line 19</span>
|
1509
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sort_on</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">fields</span>)
|
1510
|
-
<span class="ruby-identifier">code</span> = <span class="ruby-value str">%{def <=>(o)\n}</span>
|
1511
|
-
<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
1512
|
-
<span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-node">%{cmp = ( @#{f} <=> o.instance_variable_get('@#{f}') );
|
1513
|
-
return cmp unless cmp == 0\n}</span>
|
1514
|
-
}
|
1515
|
-
<span class="ruby-identifier">code</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">%{0\nend; alias_method :cmp, :<=>;}</span>
|
1516
|
-
<span class="ruby-identifier">class_eval</span>( <span class="ruby-identifier">code</span> )
|
1517
|
-
<span class="ruby-identifier">fields</span>
|
1518
|
-
<span class="ruby-keyword kw">end</span>
|
1519
|
-
</pre>
|
1520
|
-
</div>
|
1521
|
-
</div>
|
1522
|
-
</div>
|
1523
|
-
<div class="method">
|
1524
|
-
<div class="title">
|
1525
|
-
<a name="M000165"></a><b>this</b>()
|
1526
|
-
</div>
|
1527
|
-
<div class="sourcecode">
|
1528
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000165_source')" id="l_M000165_source">show source</a> ]</p>
|
1529
|
-
<div id="M000165_source" class="dyn-source">
|
1530
|
-
<pre>
|
1531
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/this.rb, line 18</span>
|
1532
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">this</span>
|
1533
|
-
<span class="ruby-identifier">klass</span> = <span class="ruby-keyword kw">self</span>
|
1534
|
-
<span class="ruby-constant">Functor</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">op</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
1535
|
-
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">op</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-value">-1</span>,<span class="ruby-value">1</span>]
|
1536
|
-
<span class="ruby-keyword kw">when</span> <span class="ruby-value str">'='</span>
|
1537
|
-
<span class="ruby-identifier">op</span> = <span class="ruby-identifier">op</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">chomp</span>(<span class="ruby-value str">'='</span>)
|
1538
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-constant">Proc</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
|
1539
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">op</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] )
|
1540
|
-
<span class="ruby-keyword kw">else</span>
|
1541
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">op</span> ) <span class="ruby-keyword kw">do</span>
|
1542
|
-
<span class="ruby-identifier">r</span> = <span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">"@#{op}"</span>, <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>] )
|
1543
|
-
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
1544
|
-
def #{op}; @#{op}; end
|
1545
|
-
}</span>
|
1546
|
-
<span class="ruby-identifier">r</span>
|
1547
|
-
<span class="ruby-keyword kw">end</span>
|
1548
|
-
<span class="ruby-keyword kw">end</span>
|
1549
|
-
<span class="ruby-keyword kw">else</span>
|
1550
|
-
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
1551
|
-
def #{op}; @#{op}; end
|
1552
|
-
}</span>
|
1553
|
-
<span class="ruby-keyword kw">end</span>
|
1554
|
-
<span class="ruby-keyword kw">end</span>
|
1555
|
-
<span class="ruby-keyword kw">end</span>
|
1556
|
-
</pre>
|
1557
|
-
</div>
|
1558
|
-
</div>
|
1559
|
-
</div>
|
1560
|
-
<div class="method">
|
1561
|
-
<div class="title">
|
1562
|
-
<a name="M000167"></a><b>wrap_method</b>( sym, &blk )
|
1563
|
-
</div>
|
1564
|
-
<div class="description">
|
1565
|
-
<p>
|
1566
|
-
Creates a new method wrapping the previous of the same name. Reference to
|
1567
|
-
the old method is passed into the new definition block as the first
|
1568
|
-
parameter.
|
1569
|
-
</p>
|
1570
|
-
<pre>
|
1571
|
-
wrap_method( sym ) { |old_meth, *args|
|
1572
|
-
old_meth.call
|
1573
|
-
...
|
1574
|
-
}
|
1575
|
-
</pre>
|
1576
|
-
<p>
|
1577
|
-
Keep in mind that this can not be used to wrap methods that take a block.
|
1578
|
-
</p>
|
1579
|
-
</div>
|
1580
|
-
<div class="aka">
|
1581
|
-
This method is also aliased as
|
1582
|
-
<a href="Module.html#M000186">wrap</a>
|
1583
|
-
</div>
|
1584
|
-
<div class="sourcecode">
|
1585
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000167_source')" id="l_M000167_source">show source</a> ]</p>
|
1586
|
-
<div id="M000167_source" class="dyn-source">
|
1587
|
-
<pre>
|
1588
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/wrap_method.rb, line 20</span>
|
1589
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wrap_method</span>( <span class="ruby-identifier">sym</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1590
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"method does not exist"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_defined?</span>( <span class="ruby-identifier">sym</span> )
|
1591
|
-
<span class="ruby-identifier">old</span> = <span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">sym</span>)
|
1592
|
-
<span class="ruby-identifier">undef_method</span>(<span class="ruby-identifier">sym</span>)
|
1593
|
-
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">sym</span>) { <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-identifier">blk</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">old</span>.<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>), <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
|
1594
|
-
<span class="ruby-keyword kw">end</span>
|
1595
|
-
</pre>
|
1596
|
-
</div>
|
1597
|
-
</div>
|
1598
|
-
</div>
|
1599
|
-
<div class="sectiontitle">Private Instance methods</div>
|
1600
|
-
<div class="method">
|
1601
|
-
<div class="title">
|
1602
|
-
<a name="M000162"></a><b>alias_module_function</b>( new, old )
|
1603
|
-
</div>
|
1604
|
-
<div class="description">
|
1605
|
-
<p>
|
1606
|
-
Alias a module function so that the alias is also a module function. The
|
1607
|
-
typical alias_method does not do this.
|
1608
|
-
</p>
|
1609
|
-
<pre>
|
1610
|
-
module Demo
|
1611
|
-
module_function
|
1612
|
-
def hello
|
1613
|
-
"Hello"
|
1614
|
-
end
|
1615
|
-
end
|
1616
|
-
|
1617
|
-
Demo.hello #=> Hello
|
1618
|
-
|
1619
|
-
module Demo
|
1620
|
-
alias_module_function( :hi , :hello )
|
1621
|
-
end
|
1622
|
-
|
1623
|
-
Demo.hi #=> Hello
|
1624
|
-
</pre>
|
1625
|
-
</div>
|
1626
|
-
<div class="sourcecode">
|
1627
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000162_source')" id="l_M000162_source">show source</a> ]</p>
|
1628
|
-
<div id="M000162_source" class="dyn-source">
|
1629
|
-
<pre>
|
1630
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/alias_module_function.rb, line 23</span>
|
1631
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alias_module_function</span>( <span class="ruby-identifier">new</span>, <span class="ruby-identifier">old</span> )
|
1632
|
-
<span class="ruby-identifier">alias_method</span>( <span class="ruby-identifier">new</span>, <span class="ruby-identifier">old</span> )
|
1633
|
-
<span class="ruby-identifier">module_function</span>( <span class="ruby-identifier">new</span> )
|
1634
|
-
<span class="ruby-keyword kw">end</span>
|
1635
|
-
</pre>
|
1636
|
-
</div>
|
1637
|
-
</div>
|
1638
|
-
</div>
|
1639
|
-
<div class="method">
|
1640
|
-
<div class="title">
|
1641
|
-
<a name="M000191"></a><b>class_extension</b>(&block)
|
1642
|
-
</div>
|
1643
|
-
<div class="description">
|
1644
|
-
<h1><a href="Module.html#M000191">class_extension</a></h1>
|
1645
|
-
<p>
|
1646
|
-
Normally when including modules, class/module methods are not extended. To
|
1647
|
-
achieve this behavior requires some clever Ruby Karate. Instead <a
|
1648
|
-
href="Module.html#M000191">class_extension</a> provides an easy to use and
|
1649
|
-
clean solution. Simply place the extending class methods in a block of the
|
1650
|
-
special module method <a href="Module.html#M000191">class_extension</a>.
|
1651
|
-
</p>
|
1652
|
-
<pre>
|
1653
|
-
module Mix
|
1654
|
-
def inst_meth
|
1655
|
-
puts 'inst_meth'
|
1656
|
-
end
|
1657
|
-
|
1658
|
-
class_methods do
|
1659
|
-
def class_meth
|
1660
|
-
"Class Method!"
|
1661
|
-
end
|
1662
|
-
end
|
1663
|
-
end
|
1664
|
-
|
1665
|
-
class X
|
1666
|
-
include Mix
|
1667
|
-
end
|
1668
|
-
|
1669
|
-
X.class_meth #=> "Class Method!"
|
1670
|
-
</pre>
|
1671
|
-
</div>
|
1672
|
-
<div class="sourcecode">
|
1673
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000191_source')" id="l_M000191_source">show source</a> ]</p>
|
1674
|
-
<div id="M000191_source" class="dyn-source">
|
1675
|
-
<pre>
|
1676
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/class_extension.rb, line 62</span>
|
1677
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">class_extension</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1678
|
-
<span class="ruby-ivar">@class_extension</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Module</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
|
1679
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">append_features</span>(<span class="ruby-identifier">mod</span>)
|
1680
|
-
<span class="ruby-identifier">append_features_without_class_extension</span>(<span class="ruby-identifier">mod</span>)
|
1681
|
-
<span class="ruby-keyword kw">end</span>
|
1682
|
-
<span class="ruby-keyword kw">end</span>
|
1683
|
-
<span class="ruby-ivar">@class_extension</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1684
|
-
<span class="ruby-ivar">@class_extension</span>
|
1685
|
-
<span class="ruby-keyword kw">end</span>
|
1686
|
-
</pre>
|
1687
|
-
</div>
|
1688
|
-
</div>
|
1689
|
-
</div>
|
1690
|
-
<div class="method">
|
1691
|
-
<div class="title">
|
1692
|
-
<a name="M000180"></a><b>redef</b>( sym, aka=nil, &blk )
|
1693
|
-
</div>
|
1694
|
-
<div class="description">
|
1695
|
-
<p>
|
1696
|
-
Alias for <a href="Module.html#M000149">redefine_method</a>
|
1697
|
-
</p>
|
1698
|
-
</div>
|
1699
|
-
</div>
|
1700
|
-
<div class="method">
|
1701
|
-
<div class="title">
|
1702
|
-
<a name="M000149"></a><b>redefine_method</b>( sym, aka=nil, &blk )
|
1703
|
-
</div>
|
1704
|
-
<div class="description">
|
1705
|
-
<p>
|
1706
|
-
Creates a new method for a pre-existing method.
|
1707
|
-
</p>
|
1708
|
-
<p>
|
1709
|
-
If <em>aka</em> is given, then the method being redefined will first be
|
1710
|
-
aliased to this name.
|
1711
|
-
</p>
|
1712
|
-
<pre>
|
1713
|
-
class Greeter
|
1714
|
-
def hello ; "Hello" ; end
|
1715
|
-
end
|
1716
|
-
|
1717
|
-
Greeter.new.hello #=> "Hello"
|
1718
|
-
|
1719
|
-
class Greeter
|
1720
|
-
redefine_method( :hello, :hi ) do
|
1721
|
-
hi + ", friend!"
|
1722
|
-
end
|
1723
|
-
end
|
1724
|
-
|
1725
|
-
Greeter.new.hello #=> "Hello, friend!"
|
1726
|
-
</pre>
|
1727
|
-
</div>
|
1728
|
-
<div class="aka">
|
1729
|
-
This method is also aliased as
|
1730
|
-
<a href="Module.html#M000180">redef</a>
|
1731
|
-
</div>
|
1732
|
-
<div class="sourcecode">
|
1733
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000149_source')" id="l_M000149_source">show source</a> ]</p>
|
1734
|
-
<div id="M000149_source" class="dyn-source">
|
1735
|
-
<pre>
|
1736
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/redefine_method.rb, line 25</span>
|
1737
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redefine_method</span>( <span class="ruby-identifier">sym</span>, <span class="ruby-identifier">aka</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1738
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"method does not exist"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_defined?</span>( <span class="ruby-identifier">sym</span> )
|
1739
|
-
<span class="ruby-identifier">alias_method</span>( <span class="ruby-identifier">aka</span>, <span class="ruby-identifier">sym</span> ) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">aka</span>
|
1740
|
-
<span class="ruby-identifier">undef_method</span>( <span class="ruby-identifier">sym</span> )
|
1741
|
-
<span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">sym</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span> )
|
1742
|
-
<span class="ruby-keyword kw">end</span>
|
1743
|
-
</pre>
|
1744
|
-
</div>
|
1745
|
-
</div>
|
1746
|
-
</div>
|
1747
|
-
<div class="method">
|
1748
|
-
<div class="title">
|
1749
|
-
<a name="M000160"></a><b>redirect</b>( method_hash )
|
1750
|
-
</div>
|
1751
|
-
<div class="description">
|
1752
|
-
<p>
|
1753
|
-
Alias for <a href="Module.html#M000150">redirect_method</a>
|
1754
|
-
</p>
|
1755
|
-
</div>
|
1756
|
-
</div>
|
1757
|
-
<div class="method">
|
1758
|
-
<div class="title">
|
1759
|
-
<a name="M000172"></a><b>rename</b>( to_sym, from_sym )
|
1760
|
-
</div>
|
1761
|
-
<div class="description">
|
1762
|
-
<p>
|
1763
|
-
Alias for <a href="Module.html#M000170">rename_method</a>
|
1764
|
-
</p>
|
1765
|
-
</div>
|
1766
|
-
</div>
|
1767
|
-
<div class="method">
|
1768
|
-
<div class="title">
|
1769
|
-
<a name="M000170"></a><b>rename_method</b>( to_sym, from_sym )
|
1770
|
-
</div>
|
1771
|
-
<div class="description">
|
1772
|
-
<p>
|
1773
|
-
Aliases a method and undefines the original.
|
1774
|
-
</p>
|
1775
|
-
<pre>
|
1776
|
-
rename_method( :to_method, :from_method )
|
1777
|
-
</pre>
|
1778
|
-
</div>
|
1779
|
-
<div class="aka">
|
1780
|
-
This method is also aliased as
|
1781
|
-
<a href="Module.html#M000172">rename</a>
|
1782
|
-
</div>
|
1783
|
-
<div class="sourcecode">
|
1784
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000170_source')" id="l_M000170_source">show source</a> ]</p>
|
1785
|
-
<div id="M000170_source" class="dyn-source">
|
1786
|
-
<pre>
|
1787
|
-
<span class="ruby-comment cmt"># File lib/facets/core/module/rename_method.rb, line 7</span>
|
1788
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rename_method</span>( <span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">from_sym</span> )
|
1789
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"method #{from_sym} does not exist"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">method_defined?</span>( <span class="ruby-identifier">from_sym</span> )
|
1790
|
-
<span class="ruby-identifier">alias_method</span>( <span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">from_sym</span> )
|
1791
|
-
<span class="ruby-identifier">undef_method</span>( <span class="ruby-identifier">from_sym</span> )
|
1792
|
-
<span class="ruby-keyword kw">end</span>
|
1793
|
-
</pre>
|
1794
|
-
</div>
|
1795
|
-
</div>
|
1796
|
-
</div>
|
1797
|
-
<div class="method">
|
1798
|
-
<div class="title">
|
1799
|
-
<a name="M000186"></a><b>wrap</b>( sym, &blk )
|
1800
|
-
</div>
|
1801
|
-
<div class="description">
|
1802
|
-
<p>
|
1803
|
-
Alias for <a href="Module.html#M000167">wrap_method</a>
|
1804
|
-
</p>
|
1805
|
-
</div>
|
1806
|
-
</div>
|
1807
|
-
</div>
|
1808
|
-
|
1809
|
-
</div>
|
1810
|
-
|
1811
|
-
</body>
|
1812
|
-
</html>
|